0.0.1 • Published 6 years ago

fractal-component-gen v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

This is a Yeoman generator to create fractal components boilerplate.

Installation

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

Configuration for Fractal

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"
      }
    ]
  }
}

Run the generator

yo fractal-component

Preview

Preview

Enjoy 🤘