Skip to content

acrool/acrool-react-component-cli

Repository files navigation

Acrool React Component CLI

Acrool React Component CLI Logo

Quickly create React components using 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

About

Quickly create React components using CLI

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published