trucks-generator-page
v1.0.2
Published
Inject output files into HTML templates
Downloads
5
Readme
Page Transform
Inject output files into HTML templates
Install
npm i trucks-transform-page --save-dev
For the command line interface see trucks-cli.
Usage
Use the page
key to configure this transform:
const trucks = require('trucks-compiler');
trucks(
{
files: ['components.html'],
transforms: ['page'],
page: {
files: {
'template.html': 'index.html'
}
}
}, (err, state) => {
if(err) {
throw err;
}
console.log(state);
}
);
API
page
public page(state, conf)
Replace processing instructions in input files with markup.
Returns map of visitor functions.
state
Object compiler state.conf
Object transform plugin configuration.
Options
files
Array list of files to process.
License
MIT
Created by mkdoc on August 3, 2016