Node.js 命令行工具如何传递参数

你用 Node.js 小试牛刀,写了个命令行工具: #!/usr/bin/env node 'use strict' const command_line_tool = require('./lib/index') command_line_tool() 并且在 package.json 中注册好了: "bin": { "omg": "./index.js" }, 安装完后,你可以在命令行下调用 omg...