forked from PrismarineJS/node-minecraft-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
32 lines (27 loc) · 704 Bytes
/
gulpfile.js
File metadata and controls
32 lines (27 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var babel = require('gulp-babel');
var options = {
stage: 0, // Dat ES7 goodness
optional: ["runtime"]
};
var sourcemaps = require('gulp-sourcemaps');
gulp.task('compile', function() {
return 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/'));
});
gulp.task('watch', function() {
return gulp.watch('src/**/*.js', ['compile']);
});
gulp.task('default', ['compile']);