From d905b17fb648c14f9e120e1b36b16c6f6ee7c3df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor=20Tozatti=20Risso?= <jvtr12@inf.ufpr.br> Date: Fri, 2 Sep 2016 13:28:30 -0300 Subject: [PATCH] Add skeleton for basic dev tasks in gulpfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Victor Tozatti Risso <jvtr12@inf.ufpr.br> --- gulpfile.babel.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index e07481f9..a40a9cac 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']); -- GitLab