verb
Version:
Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.
20 lines (17 loc) • 441 B
JavaScript
;
var PluginError = require('plugin-error');
var lint = require('lint-templates');
var through = require('through2');
module.exports = function(options) {
var app = this;
return through.obj(function (file, enc, cb) {
try {
lint(app, file);
this.push(file);
return cb();
} catch(err) {
this.emit('error', new PluginError('lint plugin', err, {stack: true}));
return cb();
}
});
};