使用Commander.js驯服node.js的命令行参数
Commander.js是Ruby中Commander在node.js中的实现.为commandline程序提供强大的参数解析能力.
如何使用新建 nodecmd.js 文件,加入如下代码:
?
?
效果:?
参考资料:Commander.js:?https://github.com/visionmedia/commander.js
Ruby Commander:?https://github.com/visionmedia/commander
?