args:用于构建命令行界面的工具包

时间:2021-01-30 19:35:10
【文件属性】:
文件名称:args:用于构建命令行界面的工具包
文件大小:72KB
文件格式:ZIP
更新时间:2021-01-30 19:35:10
cli parse command-line argv minimist args 该软件包使创建命令行界面变得轻而易举。 产品特点 Git风格的子命令(例如, pizza cheese执行“ pizza-cheese”二进制文件) 自动生成的使用情况信息 通过检查默认值的类型来确定选项的类型(例如['hi'] => ) 干净的用于定义选项和命令 轻松选项的值 如果用户输入了未知的选项,则会自动建议类似的选项 用法 安装软件包(您至少需要使用6.0.0版本): npm install --save args 完成后,您可以在二进制文件中开始使用它: #!/usr/bin/env node const args = require ( 'args' ) args . option ( 'port' , 'The port on which the app will be running' , 3000 ) . option ( 'reload' , 'Enable/disable livereloading' ) . command ( 'serve' , 'Serve your static site' , [ 's'
【文件预览】:
args-master
----.travis.yml(95B)
----package.json(1KB)
----readme.md(10KB)
----test()
--------_fixture.js(636B)
--------index.js(5KB)
----package-lock.json(233KB)
----appveyor.yml(232B)
----license.md(1KB)
----.gitignore(49B)
----lib()
--------utils.js(10KB)
--------index.js(1KB)
--------parse.js(2KB)
--------help.js(2KB)
--------example.js(312B)
--------examples.js(328B)
--------options.js(335B)
--------version.js(912B)
--------option.js(1KB)
--------command.js(444B)
----.npmrc(18B)
----.editorconfig(276B)

网友评论