Created
March 17, 2014 18:06
-
-
Save knownasilya/9604886 to your computer and use it in GitHub Desktop.
commander
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cli = require('commander'); | |
cli.command('new <type> <name>') | |
.description('Creates a new type of name') | |
.action(function (type, name) { | |
console.log(type, name); | |
}); | |
cli.parse(process.argv); | |
// node test.js new controller Hello => controller Hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment