1.0.26 • Published 7 months ago

toucan-cli v1.0.26

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Toucan Cli

1. 下载模版项目

toucan-cli template

2. 创建模版组件

a. 命令解释

# name: 组件名称
# globalName: 挂载到全局的变量名称, 默认为name
# -r / --request
toucan-cli common [name] -g [globalName] -r true

b. 执行示例

toucan-cli common Button -g ToucanCustomButton

# 需要请求
toucan-cli common Button -g ToucanCustomButton -r true

这个命令会在自定义组件开发目录下的 packages/ 下新建 Button 文件夹,里面包括 package.json, .fatherrc.ts, README.md, tsconfig.json, src/index.ts 以及 src/button.tsx

3. 表单提取

toucan-cli field index.tsx

执行示例