@miniu/plugin-command
TypeScript icon, indicating that this package has built-in type declarations

2.1.0-alpha.0 • Public • Published

@miniu/plugin-command

命令行插件

export namespace ISlotCommand {
  export interface List extends ISlot {
    name: 'command.list';
    val: [
      string,
      string,
      (yargs: Argv) => void,
      (args: { [argName: string]: unknown; _: string[]; $0: string }) => void
    ];
  }
}

示例:

export default ({ add }) => {
  add('command.list', [
    'hellow',
    '😆',
    () => {},
    (argv) => {
      console.log('hello')
    }
  ])
}
$ miniu test // hello

Readme

Keywords

none

Package Sidebar

Install

npm i @miniu/plugin-command

Weekly Downloads

75

Version

2.1.0-alpha.0

License

none

Unpacked Size

4 kB

Total Files

5

Last publish

Collaborators

  • minicode-group
  • zinkey
  • candy.zheng