-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.js
More file actions
60 lines (57 loc) · 1.46 KB
/
run.js
File metadata and controls
60 lines (57 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env node
var exports = require('./exports.js');
var argv = require('yargs')
.usage('Usage: $0 <command> [options]')
.command('usd', 'Update schema dependencies')
.example('npm run usd -u ./new.json -s ./schema.json -o ./output.json')
.option('d', {
alias: 'domain',
nargs: 1,
describe: 'Domain to fetch translations from',
type: 'string',
default: 'https://m.133a.lolacloud.com'
})
.option('p', {
alias: 'path',
nargs: 1,
describe: 'Path from domain to fetch translations from',
type: 'string',
default: '/services/translations/sub_project_translations/mobileBooking.json'
})
.option('u', {
alias: 'upload',
nargs: 1,
describe: 'Uploaded input file',
type: 'string',
// default: './mock-data/mock_uploaded_translations.json'
})
.option('s', {
alias: 'schema',
nargs: 1,
describe: 'Schema file',
type: 'string',
default: './schema.json'
})
.option('o', {
alias: 'output',
nargs: 1,
demandOption: true,
describe: 'Output file',
type: 'string',
// default: './mock-data/mock_current_translations.json'
})
.option('q', {
alias: 'quiet',
nargs: 1,
describe: 'Quieten console output to errors only',
type: 'boolean',
default: false
})
.help('h')
.alias('h', 'help')
.epilog('Copyright George Deeks 2017')
.argv
;
if (!module.parent) {
exports.run(argv);
}