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
|
|
|
|
|
|
|
const task_babel = function () {
|
|
|
|
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-01-21 09:38:49 +01:00
|
|
|
const watch_babel = function () {
|
|
|
|
return pump([
|
|
|
|
watch('src/**/*js'),
|
|
|
|
plumber(),
|
|
|
|
babel(),
|
|
|
|
gulp.dest('dist')
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
gulp.task('build', task_babel);
|
|
|
|
gulp.task('watch', watch_babel);
|