'use strict';

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)) {
      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)) {
      return to5.transform(src, { filename: filename }).code;
    }
    return src;
  }
};

@@ -132,88 +132,54 @@
 han 
-*
 .js
- and *.jsx%0A    var ext = filename.split('.').pop();%0A    if (!/%5C.jsx?$/i.test
+, .es, .jsx or .es6%0A    if (!to5.canCompile
 (fil
@@ -259,56 +259,8 @@
 les%0A
-    // 6to5 files can be .js, .es, .jsx or .es6%0A
     
@@ -306,36 +306,8 @@
 = -1
- && to5.canCompile(filename)
 ) %7B%0A

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