Create a new project
Once the generator is installed, you can then scaffold your styleguide in a few seconds: :
$ mkdir new-project
$ cd new-project
$ yo toolbox
A series of questions will prompt :
Define a project name in normal case
? What's the name of your project?
You can indicate your repo's url for the
package.json
? What's the git URL of your repo?
You can choose if you want to use Bootstrap 4 and add various meta files.
? What would you like to use in your project? (Press <space> to select) ◉ Framework (Bootstrap 4) ◉ Create Antistatique humans.txt ◉ Create CHANGELOG.md and VERSION files
You can choose here what kind of hierarchy and types of components you want. It will be Atomic Design by default, but you can be more creative.
? What kind of components hierarchy do you want to use ? Separated by a less-than sign (<) (atoms<molecules<organisms)
You can indicate where you want to place your assets directory (components, scss, js, icons, images,...). It can be in your root directory or inside a theme folder.
? Where would you like to put your assets?
You can indicate where you want to place your build directory (components, css, js, images,...). It can be in your root directory or inside a theme folder.
? Where would you like to put your build?
It finishes with dependencies installations using Yarn.
Next step
Now that your project is properly scaffolded, check what kind of file structure that produces.