1.0.3 • Published 2 years ago

@nger/cli v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
2 years ago

@nger/cli

一款装饰器风格的命令行工具

  1. Command 装饰器
  2. Option 装饰器
  3. Action 装饰器

命令: Cli Command Option Action;

Usage

#!/usr/bin/env node
import { Command, Option, createPlatform, Action, Input } from '@nger/cli';

@Command({
    name: 'test',
    desc: `测试1`,
    alias: 't1'
})
export class TestCommand {
    @Option({
        alias: `t`
    })
    test: string;

    @Action()
    do() {
        console.log(`hello test: ${this.test}`)
    }
}

@Command({
    name: 'test2',
    desc: `测试2`,
    alias: `t2`
})
export class Test2Command {
    @Option({
        alias: 't'
    })
    test: string;

    @Action()
    do() {
        console.log(`hello test2: ${this.test}`)
    }
}
createPlatform([TestCommand, Test2Command]).run()
1.0.1

2 years ago

1.0.3

2 years ago

1.1.9

4 years ago

1.1.10

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.0.0

4 years ago