Tweaking browserify setup to get all es6 features working

Currently getting an error about $traceurRuntime being undefined while
running Karma tests. This will need to be investigated.
This commit is contained in:
Jeff Avallone 2014-12-04 18:34:35 -05:00
parent e1c299453c
commit bd19966cab
2 changed files with 4 additions and 5 deletions

View File

@ -1,5 +1,6 @@
var path = require('path'),
_ = require('lodash'),
es6ify = require('es6ify'),
buildRoot = process.env.BUILD_PATH || './build',
buildPath = _.bind(path.join, path, buildRoot);
@ -25,10 +26,8 @@ module.exports = {
basedir: './src/js',
debug: true,
fullPaths: false,
entries: [es6ify.runtime],
prebundle: function(bundle) {
var es6ify = require('es6ify');
bundle.add(es6ify.runtime);
bundle.transform(require('./lib/canopy-transform'));
bundle.transform(es6ify.configure(/^(?!.*node_modules)+.+\.js$/));
}

View File

@ -66,10 +66,10 @@ gulp.task('browserify', function() {
.pipe(tap(function(file) {
var bundler = browserify(config.browserify);
bundler.add(file.path);
config.browserify.prebundle(bundler);
bundler.add(file.path);
file.contents = bundler.bundle();
}))
.pipe(transform(function() {