1.0.2 • Published 10 years ago
trucks-generator-page v1.0.2
Page Transform
Inject output files into HTML templates
Install
npm i trucks-transform-page --save-devFor 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.
stateObject compiler state.confObject transform plugin configuration.
Options
filesArray list of files to process.
License
MIT
Created by mkdoc on August 3, 2016