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:
parent
e1c299453c
commit
bd19966cab
@ -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$/));
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user