@nfts/argparser
TypeScript icon, indicating that this package has built-in type declarations

0.1.21 • Public • Published

@nfts/argparser

import { Command } from '@nfts/argparser';

Command.command('commandName', 'This is a command description')
  .argument({
    name: 'sub_command',
    description: 'This is a sub-command description'
  })
  .option({
    name: '--option',
    alias: '-o',
    description: 'This is an parameters description'
  })
  .callback(() => {
    // do something
  })
  .parse(['gmf', 'give', '--adj']);

修改:

  • [ ] 多次设置同一个参数,最后可以解析成一个集合
  • [ ] 终端输出信息的美化
  • [ ] 对 --xxx/-x=xxx 类型参数解析的支持

Readme

Keywords

none

Package Sidebar

Install

npm i @nfts/argparser

Weekly Downloads

0

Version

0.1.21

License

none

Unpacked Size

26.2 kB

Total Files

6

Last publish

Collaborators

  • leiwenpeng