Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@stbui/one-cli

stbui10ISC0.0.10-alpha.1TypeScript support: included

前后台统一构架解决方案

readme

@stbui/one-cli

nodejs 命令行

setup

npm install @stbui/one-cli @stbui/one-common --save

example

import { Command, Option, Action } from '@stbui/one-common';
import { Factory } from '@stbui/one-cli';

@Command({
    name: 'start',
    description: '启动',
    example: {
        command: 'cli start demo -p 3000 -w',
        description: '启动',
    },
})
export class StartCommand {
    @Option({
        alias: 'p',
        description: '端口',
    })
    port: number = 3000;

    @Option({
        alias: 'w',
        description: '实时监听',
    })
    watch: boolean = false;

    constructor() {}

    @Action()
    run() {
        console.log('startMode', this.watch);
        console.log('port', this.port);
        console.log('StartCommand 已执行');
    }
}

function bootstrap() {
    Factory.create([StartCommand]);
}

bootstrap();

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.0.10-alpha.1 (2023-08-03)

Features

0.0.10-alpha.0 (2021-02-01)

Bug Fixes

0.0.9-alpha.0 (2021-02-01)

Bug Fixes

0.0.8-alpha.0 (2021-01-19)

Features

0.0.6-alpha.0 (2020-10-23)

Features

0.0.5-alpha.0 (2020-10-13)

Features

0.0.4-alpha.0 (2020-10-13)

Features

0.0.3-alpha.0 (2020-10-13)

Features

0.0.2-alpha.0 (2020-10-13)

Features

0.0.1-alpha.0 (2020-10-13)

Features