Metalsmith plugin to process files with JSTransformer, using any available transformer.
npm install --save metalsmith-jstransformer
If you haven't checked out Metalsmith before, head over to their website and check out the documentation.
If you are using the command-line version of Metalsmith, you can install via npm, and then add the
metalsmith-jstransformer
key to your metalsmith.json
file:
{
"plugins": {
"metalsmith-jstransformer": {
dot: true, // micromatch options
jade: {
// jade options
}
}
}
}
If you are using the JS Api for Metalsmith, then you can require the module and add it to your
.use()
directives:
var jstransformer = require('metalsmith-jstransformer');
metalsmith.use(jstransformer({
dot: true, // micromatch options
matchBase: true,
jade: {}, // jade options
handlebars: {} // handlebars options + .version for which version to install
}));
An array of strings representing which JSTransformers to use. Example:
['jade', 'scss']