1.0.1 • Published 6 months ago
@acrool/react-component-cli v1.0.1
Acrool React Component CLI
Features
- Quickly create React components using CLI
- Supports atomic design structure (atoms, molecules, organisms)
- Configurable component paths
Install
yarn add @acrool/react-component-cliUsage
Create configuration file .acrool-react-component in your project root:
module.exports = {
atom: 'src/components/atoms',
molecule: 'src/components/molecule',
organize: 'src/components/organize',
form: 'src/components/form',
};run generate
# type: atom|molecule|organize|form
npx acrool-react-component generate -t {type} -n {componentName}Here is a faster way your can add in your package.json
{
"scripts": {
"dev": "next dev",
"comp": "acrool-react-component generate"
}
}fast run
yarn comp -n TitleBlock
# ✔ The component has been successfully generated to ./src/components/atoms/TitleName
# ✨ Done in 0.12s.Develop
build
yarn build && npx acrool-react-component generate -n TitleBlock