traxxx/src/argv.js

42 lines
1013 B
JavaScript
Raw Normal View History

'use strict';
const yargs = require('yargs');
const { argv } = yargs
.command('npm start')
.option('networks', {
describe: 'Networks to include (overrides config)',
type: 'array',
alias: 'network',
})
.option('sites', {
describe: 'Sites to include (overrides config)',
type: 'array',
alias: 'site',
})
.option('render', {
describe: 'Fetch data without rendering interface',
type: 'boolean',
default: true,
})
.option('scene', {
describe: 'Fetch scene info from URL',
type: 'string',
})
.option('copy', {
describe: 'Copy relevant result to clipboard',
type: 'boolean',
alias: 'c',
})
.option('debug', {
describe: 'Show error stack traces',
type: 'boolean',
2019-03-24 02:08:51 +00:00
})
.option('quit', {
describe: 'Exit after fetching data. Usually used with --copy.',
type: 'boolean',
alias: 'q',
});
module.exports = argv;