var ignore = require('{%= name %}');
var Base = require('base');
var app = new Base();
// register plugin
app.use(ignore());
Example
var mm = require('micromatch');
var arr = ['node_modules/foo/index.js', 'foo.js', 'bar.txt'];
console.log(mm(arr, '**/*.js'));
//=> ['node_modules/foo/index.js', 'foo.js'];
var arr = ['node_modules/foo/index.js', 'foo.js', 'bar.txt'];
console.log(mm(arr, '**/*.js', {ignore: app.ignore()}));
//=> ['foo.js'];
Patterns in .gitignore
are parsed and converted to glob patterns and the converted patterns are cached. This is useful in applications that need to potentially match against the same set of files repeatedly.
{%= apidocs("index.js") %}