1.1.0 • Published 3 years ago

guide-book-generator v1.1.0

Weekly downloads
52
License
ISC
Repository
github
Last release
3 years ago

Guide Book

The Guide Book Generator for Style Guides.


How it works:

The Guide Book goal is to look for the predefined pattern, showing here, and use it to generate an HTML page showing the Categories, Elements, and Modules of your Style Guide.


How to use

First of all on your Source Files (SCSS/SASS/STYLUS/LESS) use the below pattern:

/*GUIDE

<CATEGORY>|<SECTION>

<HTML>

*/

Where

PLACEBOLDERDescription
<CATEGORY>Category of the Example
<SECTION>Sections of the example
<HTML>Some HTML Elements

How to Setup

To setup the Guide Book create a JS file at main folder of your project, using as reference the below code:

const GuideBook = require('guide-book-generator');

const settings = {
  style: <BUILT_CSS_FILE>,
  source: <SOURCE_FOLDER>,
  output: <OUTPUT>,
}

const guideBook = new GuideBook();
guideBook.generate(settings);

Where

PLACEBOLDERTypeDescriptionExample
<BUILT_CSS_FILE>StringThe built style css file'build/style.min.css'
<SOURCE_FOLDER>StringThe Source Files (SCSS,STYLUS,LESS,...)'source/css'
<OUTPUT>StringThe folder or file to generate the Guide Book'guidebook/guide.html'

Examples

To see examples access this Repository Guide-Book-Example


Requirements Version

  • Node v12.18.1
  • NPM 6.14.5

Dependences