0.1.2 • Published 2 years ago

@byted-starry/cli v0.1.2

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

Starry 命令行工具

Starry CLI 用于帮助用户快速开发星夜组件、应用类型以及业务模型

安装

npm install -g @fes/cli
#  or
yarn global add @fes/cli

安装完成后执行 bsc -v 查看当前版本,验证是否安装成功:

Starry CLI: 0.0.3

CLI 功能

帮助信息

bsc -h

Starry CLI version: 0.0.3
Usage: bsc [options] [command]

Options:
  -v, --version            输出当前 CLI 版本
  -h, --help               display help for command

Commands:
  create [options] [name]  创建组件库
  help [command]           display help for command

查看具体命令的详细帮助信息

bsc create -h

Starry CLI version: 0.0.3
Usage: bsc create [options] [name]

创建组件库

Options:
  --ts            是否使用 ts 模版
  --type [type]   选择工程类型: compomemt/appType/model
  --install       是否自动安装依赖
  --debug         是否使用 debug 模式
  -y, --yes       全部使用默认选项
  -h, --help      输出帮助信息

Commands:
  help [command]  查看命令帮助信息

创建项目

bsc create

? 请输入项目名称: component-demo
? 请选择物料类型:  组件
? 是否使用 TypeScript? Yes
? 是否安装依赖? No
? 请选择组件导出模式 react-组件库

可以通过 bsc create -y 默认创建组件库工程

本地环境调试

cd component-demo
npm install
npm dev

? 选择调试方式 (Use arrow keys)
❯ Storybook 模式 
  低/无代码编辑器模式 
  文档开发模式 

可以根据开发场景选择对应调试方式