UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

19 lines (17 loc) 450 B
var test = require('tape'); var resolve = require('../'); test('filter', function (t) { t.plan(2); var dir = __dirname + '/resolver'; resolve('./baz', { basedir : dir, packageFilter : function (pkg) { pkg.main = 'doom'; return pkg; } }, function (err, res, pkg) { if (err) t.fail(err); t.equal(res, dir + '/baz/doom.js'); t.equal(pkg.main, 'doom'); }); });