Switching to Babel instead of es6ify
This commit is contained in:
parent
025636d559
commit
445996744a
@ -1,6 +1,5 @@
|
|||||||
var path = require('path'),
|
var path = require('path'),
|
||||||
_ = require('lodash'),
|
_ = require('lodash'),
|
||||||
es6ify = require('es6ify'),
|
|
||||||
buildRoot = process.env.BUILD_PATH || './build',
|
buildRoot = process.env.BUILD_PATH || './build',
|
||||||
buildPath = _.bind(path.join, path, buildRoot);
|
buildPath = _.bind(path.join, path, buildRoot);
|
||||||
|
|
||||||
@ -20,10 +19,5 @@ module.exports = {
|
|||||||
browserify: {
|
browserify: {
|
||||||
debug: true,
|
debug: true,
|
||||||
fullPaths: false,
|
fullPaths: false,
|
||||||
entries: [es6ify.runtime],
|
|
||||||
},
|
|
||||||
prebundle: function(bundle) {
|
|
||||||
bundle.transform(require('./lib/canopy-transform'));
|
|
||||||
bundle.transform(es6ify.configure(/^(?!.*node_modules)+.+\.js$/));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -104,11 +104,10 @@ gulp.task('scripts', function() {
|
|||||||
return gulp.src('./src/js/main.js', { read: false })
|
return gulp.src('./src/js/main.js', { read: false })
|
||||||
.pipe(errorHandler())
|
.pipe(errorHandler())
|
||||||
.pipe(tap(function(file) {
|
.pipe(tap(function(file) {
|
||||||
var bundler = browserify(config.browserify);
|
var bundler = browserify(config.browserify)
|
||||||
|
.transform(require('./lib/canopy-transform'))
|
||||||
config.prebundle(bundler);
|
.transform(require('babelify'))
|
||||||
|
.add(file.path);
|
||||||
bundler.add(file.path);
|
|
||||||
|
|
||||||
file.contents = bundler.bundle();
|
file.contents = bundler.bundle();
|
||||||
}))
|
}))
|
||||||
|
@ -3,7 +3,6 @@ var _ = require('lodash'),
|
|||||||
|
|
||||||
module.exports = function(karma) {
|
module.exports = function(karma) {
|
||||||
var globs = _.flatten([
|
var globs = _.flatten([
|
||||||
require('es6ify').runtime, // Hack to get traceurRuntime in the build
|
|
||||||
config.globs.js,
|
config.globs.js,
|
||||||
config.globs.spec
|
config.globs.spec
|
||||||
]);
|
]);
|
||||||
@ -22,8 +21,9 @@ module.exports = function(karma) {
|
|||||||
autoWatch: true,
|
autoWatch: true,
|
||||||
singleRun: false,
|
singleRun: false,
|
||||||
browserify: _.extend({
|
browserify: _.extend({
|
||||||
configure: function(bundle) {
|
configure: function(bundler) {
|
||||||
config.prebundle(bundle);
|
bundler.transform(require('./lib/canopy-transform'));
|
||||||
|
bundler.transform(require('babelify'));
|
||||||
}
|
}
|
||||||
}, config.browserify)
|
}, config.browserify)
|
||||||
});
|
});
|
||||||
|
@ -10,9 +10,10 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"babel-preset-es2015": "^6.0.14",
|
||||||
|
"babelify": "^7.1.0",
|
||||||
"browserify": "^12.0.1",
|
"browserify": "^12.0.1",
|
||||||
"canopy": "^0.2.0",
|
"canopy": "^0.2.0",
|
||||||
"es6ify": "^1.5.1",
|
|
||||||
"folder-toc": "^0.1.0",
|
"folder-toc": "^0.1.0",
|
||||||
"gulp": "^3.8.10",
|
"gulp": "^3.8.10",
|
||||||
"gulp-connect": "^2.2.0",
|
"gulp-connect": "^2.2.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user