React Functional Component Generator in Atomic and Lego architecture in JavaScript and TypeScript
npm install @jstb/catalystConfigurable Component Generator for React
``bash`
npm install @jstb/catalyst
`json`
"scripts": {
"generate": "catalyst"
},
`bash`
npm run generate
Customizations can be configured in package.json in the following format.
`json`
"catalystConfig":{
"styling":"scss"
...
},
The options available are
|OPTION|DEFAULT|VALUES|DESCRIPTION|
|------|-------|------|-----------|
|lang| auto detect (looks for tsconfig.json at the project root) |"js", "ts"|Components in JS or TSX|"none"
|arch|| "atomic", "lego" or "none"|It follows Brad Frosts Atomic Design pattern for generating components(Atoms, Molecules Organisms, Templates and Pages). Alternatively, you can generate Lego Design Pattern(Bricks and Sets). You can also chose none, where there will be a flat directory structure|false
|skipStories||false, true| If you are not using storybooks or don't want the .story.js or .story.ts to be created.false
|skipTests||false, true| If you do not want to start writing unit tests yet. _(who am I to judge...)_ .src/[components/containers]
|targetBasePath||any directory path relative to project root|If you want to create the components in a different location in your project. Useful if you're using monorepos|css
|styling||css or scss or less`|