Permalink
Browse files

Update to babel v6

Previously I couldn't get the rollup preset to work in the build for v6, but this solved it.
  • Loading branch information...
1 parent e55293f commit 03b229c29d727c2e2411cfbf5677de829ee6e7aa @paulfalgout paulfalgout committed Feb 2, 2016
Showing with 29 additions and 20 deletions.
  1. +1 −0 .babelrc
  2. +4 −1 gulp/build.js
  3. +4 −2 gulp/{browser-test.js → test-browser.js}
  4. +1 −1 gulp/test.js
  5. +1 −1 gulpfile.babel.js
  6. +16 −13 package.json
  7. +1 −1 test/setup/node.js
  8. +1 −1 test/setup/setup.js
View
@@ -1,2 +1,3 @@
{
+ "presets": [ "es2015" ]
}
View
@@ -12,6 +12,7 @@ import unwrapper from 'gulp-unwrapper';
import { rollup } from 'rollup';
import babel from 'rollup-plugin-babel';
import json from 'rollup-plugin-json';
+import preset from 'babel-preset-es2015-rollup';
import banner from './_banner';
import {name, version} from '../package.json';
@@ -72,7 +73,9 @@ function bundle(type) {
plugins: [
json(),
babel({
- sourceMaps: true
+ sourceMaps: true,
+ presets: [ preset ],
+ babelrc: false
})
]
}).then(bundle => {
@@ -3,8 +3,9 @@ import livereload from 'gulp-livereload';
import plumber from 'gulp-plumber';
import babelify from 'babelify';
+import preset from 'babel-preset-es2015';
import browserify from 'browserify';
-import buffer from 'vinyl-buffer';
+import buffer from 'vinyl-buffer';
import glob from 'glob';
import source from 'vinyl-source-stream';
@@ -29,7 +30,8 @@ function bundle() {
// Set up Babelify so that ES6 works in the tests
bundler.transform(babelify.configure({
- sourceMapRelative: __dirname + '/src'
+ sourceMapRelative: __dirname + '/src',
+ presets: [ preset ]
}));
return _runBrowserifyBundle(bundler);
View
@@ -7,7 +7,7 @@ import coveralls from 'gulp-coveralls';
const mochaGlobals = ['stub', 'spy', 'expect'];
function _registerBabel() {
- require('babel-core/register');
+ require('babel-register');
}
function _mocha() {
View
@@ -1,8 +1,8 @@
import gulp from 'gulp';
-import './gulp/browser-test';
import './gulp/build';
import './gulp/linting';
import './gulp/test';
+import './gulp/test-browser';
gulp.task('watch-code', function() {
gulp.watch(['src/**/*', 'test/**/*'], ['lint-code', 'test']);
View
@@ -43,39 +43,42 @@
"underscore": "1.8 - 1.8.3"
},
"devDependencies": {
- "babel-core": "^5.0.0",
- "babel-eslint": "^4.1.3",
- "babelify": "^6.4.0",
- "browserify": "^12.0.1",
+ "babel-core": "^6.4.5",
+ "babel-eslint": "^4.1.7",
+ "babel-preset-es2015": "^6.3.13",
+ "babel-preset-es2015-rollup": "^1.1.1",
+ "babel-register": "^6.4.3",
+ "babelify": "^7.2.0",
+ "browserify": "^13.0.0",
"chai": "^3.4.0",
- "chai-jq": "0.0.8",
+ "chai-jq": "0.0.9",
"dox": "git://github.com/jasonLaster/dox.git#marked",
- "glob": "^5.0.15",
+ "glob": "^7.0.0",
"gulp": "^3.9.0",
"gulp-coveralls": "^0.1.4",
- "gulp-eslint": "^1.0.0",
+ "gulp-eslint": "^2.0.0",
"gulp-file": "^0.2.0",
"gulp-filter": "^3.0.1",
"gulp-header": "^1.7.1",
"gulp-istanbul": "^0.10.2",
"gulp-jscs": "^3.0.2",
- "gulp-lintspaces": "^0.3.1",
+ "gulp-lintspaces": "^0.4.1",
"gulp-livereload": "^3.8.1",
"gulp-mocha": "^2.1.3",
"gulp-plumber": "^1.0.1",
- "gulp-preprocess": "^1.2.0",
+ "gulp-preprocess": "^2.0.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-tap": "^0.1.3",
"gulp-uglify": "^1.4.2",
"gulp-unwrapper": "^0.1.0",
"gulp-util": "^3.0.7",
"gulp-yaml-validate": "^1.0.2",
- "isparta": "^3.1.0",
+ "isparta": "^4.0.0",
"jquery": "^2.1.4",
- "jsdom": "^7.0.2",
- "rollup": "^0.21.1",
- "rollup-plugin-babel": "^1.0.0",
+ "jsdom": "^8.0.2",
+ "rollup": "^0.25.2",
+ "rollup-plugin-babel": "^2.3.9",
"rollup-plugin-json": "^2.0.0",
"sinon": "^1.17.2",
"sinon-chai": "^2.8.0",
View
@@ -22,5 +22,5 @@ if (!global.document || !global.window) {
}
-require('babel-core/register');
+require('babel-register');
require('./setup')();
View
@@ -5,7 +5,7 @@ module.exports = function() {
Backbone.$ = jQuery;
Backbone.ChildViewContainer = require('backbone.babysitter');
Backbone.Radio = require('backbone.radio');
- var Marionette = require('../../src/backbone.marionette');
+ var Marionette = require('../../src/backbone.marionette').default;
global.$ = global.jQuery = jQuery;
global._ = _;

0 comments on commit 03b229c

Please sign in to comment.