Constructor
new KssBuilderBaseTwig()
Create a KssBuilderBaseTwig object.
const KssBuilderBaseTwig = require('kss/builder/base/twig');
const builder = new KssBuilderBaseTwig();
Methods
build(styleGuide) → {Promise.<KssStyleGuide>}
Build the HTML files of the style guide given a KssStyleGuide object.
Parameters:
Name | Type | Description |
---|---|---|
styleGuide |
KssStyleGuide | The KSS style guide in object format. |
Returns:
A Promise
object resolving to a
KssStyleGuide
object.
- Type
- Promise.<KssStyleGuide>
prepare(styleGuide) → {Promise.<null>}
Allow the builder to preform pre-build tasks or modify the KssStyleGuide object.
The method can be set by any KssBuilderBase sub-class to do any custom tasks after the KssStyleGuide object is created and before the HTML style guide is built.
Parameters:
Name | Type | Description |
---|---|---|
styleGuide |
KssStyleGuide | The KSS style guide in object format. |
Returns:
A Promise
object resolving to null
.
- Type
- Promise.<null>