1.0.1 • Published 1 year ago

cli-demo-pitter v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

在 package.json 文件增加 bin 对象,并指定入口文件 dist/index.js。

在命令行运行需要在入口文件的第一行增加 #!/usr/bin/env node { "name": "cli-demo", "version": "0.0.1", "description": "cli demo", "keywords": "cli" , "bin": { "cli-demo": "dist/index.js" } ... }

命令行工具,也会涉及到用户交互的动作

commander:完整的 node.js 命令行解决方案。 inquirer:交互式命令行工具。