From 582b1260a2f77f0b341a3cb0093deb6cbd395e14 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 14 Oct 2017 15:17:16 -0400 Subject: [PATCH] Update gulpfile to separate apps --- gulpfile.js | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 2533d85..0fcc1fd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -3,11 +3,27 @@ var concat = require('gulp-concat'); var rename = require('gulp-rename'); var uglify = require('gulp-uglify'); -var jsFiles = 'public/js/**/*.js', - jsDest = 'public/libs/app'; - -gulp.task('concat', function() { - return gulp.src(jsFiles) - .pipe(concat('app.js')) - .pipe(gulp.dest(jsDest)); +gulp.task('js', function() { + gulp.start('shimapan'); + gulp.start('shimapan-panel'); +}); + +gulp.task('shimapan', function() { + return gulp.src([ + 'public/js/services/*.js', + 'public/js/shimapan/**/*.js' + ]) + .pipe(concat('shimapan.min.js')) + .pipe(uglify()) + .pipe(gulp.dest('public/libs/app')); +}); + +gulp.task('shimapan-panel', function() { + return gulp.src([ + 'public/js/services/*.js', + 'public/js/shimapan-panel/**/*.js' + ]) + .pipe(concat('shimapan-panel.min.js')) + .pipe(uglify()) + .pipe(gulp.dest('public/libs/app')); });