Closed rahul286 closed 7 years ago
Similar framework : https://github.com/flatiron/flatiron
Nodejs implements subcommand differently - https://github.com/tj/commander.js/issues/63#issuecomment-8944843
Posted PM style app here - https://github.com/rtCamp/cli/tree/nodepm
I have implemented multiple levels.
rahul286:cli/ (nodepm✗) $ ./index.js --help [20:22:33]
Usage: index [options] [command]
Commands:
install [name] install one or more packages
search [query] search with optional query
list list packages installed
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-V, --version output the version number
rahul286:cli/ (nodepm✗) $ ./index.js list --help [20:22:36]
Usage: index-list [options] [command]
Commands:
foo list packages installed
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-a, --all hidden files listing
rahul286:cli/ (nodepm✗) $ ./index.js list foo --help [20:22:47]
Usage: index-list-foo [options]
Options:
-h, --help output usage information
@rahul286 I will try to implement some ee commands, in the same way.
I've found this no longer works.
Sparky:commander andrew$ node ee site create
fs.js:901
return binding.lstat(pathModule._makeLong(path));
^
Error: ENOENT: no such file or directory, lstat '/Users/andrew/Downloads/cli-master/nodejs/commander/ee-site'
at fs.lstatSync (fs.js:901:18)
at exports.readlinkSync (/Users/andrew/Downloads/cli-master/nodejs/commander/node_modules/graceful-readlink/index.js:5:7)
at Command.executeSubCommand (/Users/andrew/Downloads/cli-master/nodejs/commander/node_modules/commander/index.js:503:14)
at Command.parse (/Users/andrew/Downloads/cli-master/nodejs/commander/node_modules/commander/index.js:463:17)
at Object.<anonymous> (/Users/andrew/Downloads/cli-master/nodejs/commander/ee-site.js:7:4)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
Sparky:commander andrew$
@acrawly this was a trial project. We were testing node.js.
In case you would like to use EasyEngine, please visit https://easyengine.io/ for instructions.
Otherwise, let us know how we can help you. :-)
https://github.com/tj/commander.js