Skip to content

Commit

Permalink
chore: gulp watch add extensions build
Browse files Browse the repository at this point in the history
  • Loading branch information
06wj committed May 19, 2016
1 parent 834ece2 commit dc4a75b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ gulp.task('extensions', function(){
.pipe(concat(extensionName + '.js'))
.pipe(header(getFileInfo(extensionName)))
.pipe(gulp.dest(dest))
.pipe(uglify())
.pipe(gulpif(!isWatch, uglify()))
.pipe(rename({extname:'.min.js'}))
.pipe(header(getFileInfo(extensionName)))
.pipe(gulp.dest(dest));
Expand Down Expand Up @@ -222,8 +222,9 @@ gulp.task('setIsWatch', function(cb){
cb();
});

gulp.task('watch', ['setIsWatch', 'standalone', 'flash'], function(){
gulp.task('watch', ['setIsWatch', 'standalone', 'flash', 'extensions'], function(){
gulp.watch('src/**/*.js', ['standalone', 'flash']);
gulp.watch('src/extensions/**/*.js', ['extensions']);
});

//test
Expand Down

0 comments on commit dc4a75b

Please sign in to comment.