1.0.3 • Published 3 years ago

@nger/cli v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
3 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

3 years ago

1.0.3

3 years ago

1.1.9

6 years ago

1.1.10

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.0.0

6 years ago