2018-01-21 09:38:49 +01:00
|
|
|
const
|
2018-01-10 17:02:29 +01:00
|
|
|
gulp = require('gulp'),
|
|
|
|
pump = require('pump'),
|
2018-01-21 09:38:49 +01:00
|
|
|
babel = require('gulp-babel'),
|
|
|
|
plumber = require('gulp-plumber'),
|
|
|
|
watch = require('gulp-watch');
|
2018-01-10 17:02:29 +01:00
|
|
|
|
2018-03-21 00:29:00 +01:00
|
|
|
const task_build = function () {
|
2018-01-10 17:02:29 +01:00
|
|
|
return pump([
|
2018-01-21 09:38:49 +01:00
|
|
|
gulp.src('src/**/*js'),
|
|
|
|
plumber(),
|
|
|
|
babel(),
|
|
|
|
gulp.dest('dist')
|
|
|
|
]);
|
2018-01-10 17:02:29 +01:00
|
|
|
}
|
|
|
|
|
2018-03-21 00:29:00 +01:00
|
|
|
const task_watch = function () {
|
2018-01-21 09:38:49 +01:00
|
|
|
return pump([
|
|
|
|
watch('src/**/*js'),
|
|
|
|
plumber(),
|
|
|
|
babel(),
|
|
|
|
gulp.dest('dist')
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2018-03-21 00:29:00 +01:00
|
|
|
gulp.task('build', task_build);
|
|
|
|
gulp.task('watch', task_watch);
|