This is a Yeoman generator to create fractal components boilerplate.
Install Yeoman and generator-fractal-component using npm.
npm install -g yo
Either install the generator globally or as a dev dependency
npm install --save-dev fractal-component-gen
Create a .yo-rc.json
file in the root of your project and set all the values according to your needs
{
"generator-fractal-component": {
"componentsPath": "./styleguide/components",
"prefixComponents": false,
"updateLoaderCMD": {
"cmd": "yarn",
"args": ["fractal", "generate:sass"]
},
"componentTypes": [
{
"name": "atom",
"path": "atoms",
"prefix": "a"
},
{
"name": "molecule",
"path": "molecules",
"prefix": "m"
},
{
"name": "organism",
"path": "organisms",
"prefix": "o"
},
{
"name": "template",
"path": "templates",
"prefix": "t"
}
]
}
}
yo fractal-component
Enjoy 🤘