node-minecraft-protocol/gulpfile.js

24 lines
500 B
JavaScript
Raw Normal View History

2015-02-22 11:27:46 -05:00
var gulp = require('gulp');
var babel = require('gulp-babel');
var options = {
experimental: true // Dat ES7 goodness
};
2015-02-22 11:49:29 -05:00
var sourcemaps = require('gulp-sourcemaps');
2015-02-22 11:27:46 -05:00
gulp.task('compile', function() {
gulp
2015-02-22 11:45:15 -05:00
.src('src/*.js')
2015-02-22 11:49:29 -05:00
.pipe(sourcemaps.init())
2015-02-22 11:27:46 -05:00
.pipe(babel(options))
2015-02-22 11:49:29 -05:00
.pipe(sourcemaps.write('maps/'))
2015-02-22 11:45:15 -05:00
.pipe(gulp.dest('dist/'));
2015-02-22 11:27:46 -05:00
});
gulp.task('watch', function() {
2015-02-22 11:45:15 -05:00
gulp.watch('src/*.js', ['compile']);
2015-02-22 11:27:46 -05:00
});
gulp.task('default', ['compile']);