npm i react-configurator
- 使用命令行生成react组件
- 注意这里采用的是styled-components的方式使用css
npx create-component [options] <ComponentName> <OutputDirectory>
npx create-component ts MyComponent ./src/components
// 成功后终端输出
Component index.tsx created successfully at src\components\MyComponent\index.tsx,
Component style.ts created successfully at src\components\MyComponent\style.ts