How to use the args function from cli
Find comprehensive JavaScript cli.args code examples handpicked from public code repositorys.
GitHub: keithamus/hashmark
60 61 62 63 64 65 66 67 68 69
var files = process.stdin; if (cli.options.name) { files.fileName = cli.options.name; } if (cli.args.length) { files = cli.args.reduce(function(files, pattern) { return files.concat(cli.glob.sync(path.join(cli.options.cwd, pattern))); }, []); } hash(files, cli.options).on('end', function (map) {
21
195
6
45 46 47 48 49 50 51 52 53 54
try { // importing files var inputfiles = cli.args.slice(0); if (inputfiles.length === 0) { console.log('\nNo input file(s) specified.'); process.exit(0);
8
36
10