A Yeoman generator for scaffolding out a module for use in the JigSass framework.
First, install Yeoman and generator-jigsass-module using npm (Assuming you already have node.js pre-installed).
npm i -g yo
npm i -g generator-jigsass-module
Then generate your new project:
mkdir jigsass-my-new-model && cd $_
yo jigsass-module
Running the generator will create the following file structure:
See the generated README.md
for more details
┬ ./
│
├─┬ scss/
│ └─ index.scss # The module's importable file.
│
├─┬ sgSrc/ # Style guide sources
│ │
│ ├── sg.scc # It is a best practice for JigSass
│ │ # modules to not automatically generate
│ │ # css and documentation on `@import`
│ │ # Please use this file to enable css
│ │ # and documentation comments) generation.
│ │
│ └── assets/ # Files in `sgSrc/assets` will be
│ # available for use in the style guide
│
├── sassdoc/ # Generated documentation
│ # of the module's sass features
│
├── styleguide/ # Generated documentation
│ # of the module's CSS
│
└─┬─ test/
│
├─┬ helpers/
│ │
│ ├── importer.scss # Used for easilty importing tested scss files
│ │
│ └── _test_helpers.scss # JigSass's assertion helpers,
│ # for use inside Sassaby tests.
│
├── helper.js # Used for defining global `before()`
│ # functions and requiring modules.
│
└── test_<%= moduleName %> # Specs. Mocha will automatically
# run all javascript files located
# in the `test` directory.
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced. Feel free to learn more about him.
MIT