diff --git a/lib/index.js b/lib/index.js index 808d421..67d6ed5 100644 --- a/lib/index.js +++ b/lib/index.js @@ -20,7 +20,6 @@ function render({ filename, files, metadata, engineOptions }) { // Stop if the current extension can't be transformed if (!transform) { debug(`no transformer available for ${ext} extension for ${filename}`); - extensions.push(ext); return Promise.resolve(); } diff --git a/lib/index.test.js b/lib/index.test.js index 03e251e..9f59014 100644 --- a/lib/index.test.js +++ b/lib/index.test.js @@ -236,4 +236,26 @@ describe('metalsmith-in-place', () => { done(); }); }); + + it('should allow extending with pug templates', done => { + const base = path.join( + process.cwd(), + 'test', + 'fixtures', + 'ignore-extension-without-jstransformer' + ); + const actual = path.join(base, 'build'); + const expected = path.join(base, 'expected'); + const metalsmith = new Metalsmith(base); + + rimraf.sync(actual); + + return metalsmith.use(plugin()).build(err => { + if (err) { + return done(err); + } + expect(() => equal(actual, expected)).not.toThrow(); + return done(); + }); + }); });