1.0.1 • Published 5 months ago

@acrool/react-component-cli v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Acrool React Component CLI

NPM npm npm

npm downloads npm

Features

  • Quickly create React components using CLI
  • Supports atomic design structure (atoms, molecules, organisms)
  • Configurable component paths

Install

yarn add @acrool/react-component-cli

Usage

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

License

MIT © Acrool & Imagine

1.0.1

5 months ago

1.0.0

5 months ago