cmd.js 752 B

1234567891011121314151617181920212223242526272829303132
  1. 'use strict';
  2. const os = require('os');
  3. const yargs = require('yargs');
  4. const argv = yargs(process.argv.slice(1))
  5. .usage('Usage: $0 [file] [options]')
  6. .help('help')
  7. .alias('version', 'v')
  8. .option('help', {
  9. alias: 'h'
  10. })
  11. .option('development', {
  12. alias: 'd',
  13. type: 'boolean',
  14. describe: 'Enable Development Mode (press F12 to open DevTools)',
  15. })
  16. .option('classic', {
  17. alias: 'c',
  18. type: 'boolean',
  19. describe: 'Use classic window title bar (for Windows only)',
  20. })
  21. .command({
  22. command: '$0 [file]',
  23. aliases: ['new'],
  24. desc: 'Create new download task from exist torrent/metalink file'
  25. })
  26. .argv;
  27. module.exports = {
  28. argv: argv
  29. };