How to use the usage function from optimist
Find comprehensive JavaScript optimist.usage code examples handpicked from public code repositorys.
GitHub: oyvindeh/ucss
![oyvindeh profile picture](/oyvindeh.png?size=40)
37 38 39 40 41 42 43 44 45 46
+ '\nIf no arguments are specified, uCSS will assume there is a ' + 'config_ucss.js file in the current directory.'); }; // Arguments parsing var argv = optimist.usage('Check if CSS selectors matches anything in given HTML.\n' + 'Usage: $0 [OPTION]...') .options({ help: { description: 'This help text.'
GitHub: songinyong/sage2
127 128 129 130 131 132 133 134 135 136 137
// --------------------------------------------- // Parse command line arguments // --------------------------------------------- console.log('--------------------------------------------'); optimist = optimist.usage('Usage: $0 -h -p password -f [json file]'); if (platform === "Windows") { optimist = optimist.default('f', path.join('config', 'windows.json')); } else { optimist = optimist.default('f', path.join('config', 'sabi.json'));
GitHub: ednity/nightwatch
![ednity profile picture](/ednity.png?size=40)
61 62 63 64 65 66 67 68
return _COMMANDS_[name]; }; this.init = function() { return opt.usage('Usage: $0 [options]').options(_DEFAULTS_).argv; }; })();
+ 11 other calls in file
73 74 75 76 77 78 79 80 81 82
return _COMMANDS_[name]; } init() { if (!__argv__) { __argv__ = opt.usage('Usage: $0 [source] [options]') .option('source', { string: true }) .options(__Options__);
+ 7 other calls in file
optimist.argv is the most popular function in optimist (138 examples)