You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
547 B
18 lines
547 B
const run = require('./test/util').run;
|
|
|
|
// run(cmd => cmd.arg().name('qwe').end().arg().name('zxc').end().act(function(opts, args) { console.log({opts, args}); }), ['qwe', 'zxc']) // cmd and args
|
|
// .then(res => {
|
|
// // code
|
|
// // stdout
|
|
// // stderr
|
|
// console.log(res);
|
|
// });
|
|
|
|
run(cmd => cmd.opt().name('version').short('v').only().flag().act((opts) => { return 'aasd'; }), ['-v']) // cmd and args
|
|
.then(res => {
|
|
// code
|
|
// stdout
|
|
// stderr
|
|
console.log(res);
|
|
});
|