Update babel

This commit is contained in:
roblabla 2015-05-21 20:22:20 +00:00
parent fb6641b374
commit 9295bcfbdb
2 changed files with 15 additions and 5 deletions

View File

@ -1,8 +1,10 @@
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var babel = require('gulp-babel');
var options = {
experimental: true // Dat ES7 goodness
stage: 0, // Dat ES7 goodness
optional: ["runtime"]
};
var sourcemaps = require('gulp-sourcemaps');
@ -10,8 +12,15 @@ var sourcemaps = require('gulp-sourcemaps');
gulp.task('compile', function() {
gulp
.src('src/**/*.js')
.pipe(plumber({
errorHandler: function(err) {
console.error(err.stack);
this.emit('end');
}
}))
.pipe(sourcemaps.init())
.pipe(babel(options))
.pipe(plumber.stop())
.pipe(sourcemaps.write('maps/'))
.pipe(gulp.dest('dist/'));
});

View File

@ -28,18 +28,19 @@
},
"browser": "browser.js",
"devDependencies": {
"batch": "~0.3.1",
"gulp": "^3.8.11",
"gulp-babel": "^4.0.0",
"gulp-plumber": "^1.0.1",
"gulp-babel": "^5.1.0",
"gulp-sourcemaps": "^1.3.0",
"mkdirp": "~0.3.4",
"mocha": "~1.8.2",
"rimraf": "~2.1.1",
"zfill": "0.0.1",
"batch": "~0.3.1",
"jsonschema": "~1.0.1"
"jsonschema": "~1.0.1",
"zfill": "0.0.1"
},
"dependencies": {
"babel-runtime": "^5.4.4",
"buffer-equal": "0.0.0",
"node-uuid": "~1.4.1",
"prismarine-nbt": "0.0.1",