1.1.2 • Published 4 years ago

flyvv-component-cli v1.1.2

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

命令行一键创建组件

命令格式:

mkreact 组件名 组件路径 组件样式文件 组件格式要求

design:

命令名: mkreact组件名: 保持react组件命名规则组件路径: 默认为当前命令行所在目录为根目录组件样式文件:-s or --scss: 创建.scss样式文件;-l or --less: 创建.scss样式文件;默认为 .文件css组件格式要求: -p or --pure: 是否创建函数式组件;-j or --jsx: 创建jsx的组件;-t or --tsx: 创建tsx组件;默认为 tsx,class组件。

example:

安装:

npm install  flyvv-component-cli  -g

1、在项目src/component/layout目录下创建一个Test的函数式的ts组件,样式为less。

mkreact Test src/component/layout -l -p -t 

or

mkreact Test /src/component/layout -l -p -t 

个人经常会忘记第一个/,所以做了兼容2、最简单的使用

mkreact Test
1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago