var renderFile = require('{%= name %}');
var assemble = require('assemble');
// register as an instance plugin with assemble
var app = assemble()
.use(renderFile());
// then use in a vinyl pipeline
app.src('*.hbs')
.pipe(app.renderfile())
.pipe(app.dest('foo'));
By default, when no engine is found for a file an error is thrown. To get around this you can either define a noop
engine, or use disable the engineStrict option.
A noop engine follows the same signature as any engine, but must be registered using the key: noop
.
Example
app.engine('noop', function(view, opts, next) {
// do whatever you want to `view`, or nothing
next(null, view);
});
By default, when no engine is found for a file an error is thrown. This can be disabled with the following:
app.option('engineStrict', false);
When disabled and an engine is not found, files are just passed through.