ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit a3505d7bb42ac3afa5ad9c28b05bee75b44ff3f4
parent 70ab34162736cb36d47f12b5d111f7cc9f14e713
Author: Konstantin Tarkus <hello@tarkus.me>
Date:   Mon,  9 Feb 2015 22:58:30 +0300

Update `./preprocessor.js`. Ref #64

Diffstat:
Mpreprocessor.js | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/preprocessor.js b/preprocessor.js @@ -4,14 +4,12 @@ var to5 = require('6to5-core'); module.exports = { process: function(src, filename) { - // Ignore files other than *.js and *.jsx - var ext = filename.split('.').pop(); - if (!/\.jsx?$/i.test(filename)) { + // Ignore files other than .js, .es, .jsx or .es6 + if (!to5.canCompile(filename)) { return ''; } // Ignore all files within node_modules - // 6to5 files can be .js, .es, .jsx or .es6 - if (filename.indexOf('node_modules') === -1 && to5.canCompile(filename)) { + if (filename.indexOf('node_modules') === -1) { return to5.transform(src, { filename: filename }).code; } return src;