diff --git a/gulpfile.babel.js b/gulpfile.babel.js index e07481f9eecc0b8219d5355a994eaf2ee1d56d74..a40a9cac2f62a0fc328222ddce85ce73db0c207e 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -2,7 +2,10 @@ const gulp = require('gulp'); const babel = require('gulp-babel'); const eslint = require('gulp-eslint'); -gulp.task('default', () => { +/** + * Compile source files + */ +function compile() { // run ESLint gulp.src('src/**/*.js') .pipe(eslint()) @@ -12,4 +15,23 @@ gulp.task('default', () => { gulp.src('src/**/*.js') .pipe(babel()) .pipe(gulp.dest('build')); + + // copy configuration file to build directory + gulp.src('config.json') + .pipe(gulp.dest('build')); + +} + +gulp.task('build', compile); + +gulp.task('run', ['build'], () => { }); + +gulp.task('watch', [], () => { + compile(); +}); + +gulp.task('test', ['build'], () => { +}); + +gulp.task('default', ['watch']);