Skip to content

Commit

Permalink
Fix zestedesavoir#2253: gulp watch intercepte les erreurs js
Browse files Browse the repository at this point in the history
  • Loading branch information
A-312 authored and Situphen committed Feb 13, 2015
1 parent 06a2d2b commit 7b8bbd7
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions Gulpfile.js
Expand Up @@ -64,7 +64,10 @@ gulp.task("bundle", function() {
.pipe($.streamify($.size({ title: "App file" })))
.pipe(gulp.dest(destDir))
.pipe($.rename({ suffix: ".min" }))
.pipe($.streamify($.uglify()))
.pipe($.streamify($.uglify().on('error', $.notify.onError({
title: "Javascript error",
message: "<%= error.message %>"
}))))
.pipe($.streamify($.size({ title: "App file (minified)" })))
.pipe(gulp.dest(destDir));
}
Expand Down Expand Up @@ -99,7 +102,10 @@ gulp.task("vendors", ["vendors-js", "vendors-css"], function() {
.pipe(gulp.dest(destDir + scriptsDir))
.pipe($.rename({ suffix: ".min" }))
.pipe($.size({ title: "Scripts (vendors, minified)" }))
.pipe($.uglify())
.pipe($.uglify().on('error', $.notify.onError({
title: "Javascript error",
message: "<%= error.message %>"
})))
.pipe(gulp.dest(destDir + scriptsDir));
});

Expand Down Expand Up @@ -179,7 +185,10 @@ gulp.task("scripts", function() {
.pipe($.size({ title: "Scripts" }))
.pipe(gulp.dest(destDir + scriptsDir))
.pipe($.rename({ suffix: ".min" }))
.pipe($.uglify())
.pipe($.uglify().on('error', $.notify.onError({
title: "Javascript error",
message: "<%= error.message %>"
})))
.pipe($.size({ title: "Scripts (minified)" }))
.pipe(gulp.dest(destDir + scriptsDir));
});
Expand All @@ -202,7 +211,10 @@ gulp.task("merge-scripts", ["vendors", "scripts"], function() {
.pipe($.size({ title: "Scripts (all)" }))
.pipe(gulp.dest(destDir + scriptsDir))
.pipe($.rename({ suffix: ".min" }))
.pipe($.uglify())
.pipe($.uglify().on('error', $.notify.onError({
title: "Javascript error",
message: "<%= error.message %>"
})))
.pipe($.size({ title: "Scripts (all, minified)" }))
.pipe(gulp.dest(destDir + scriptsDir));
});
Expand Down

0 comments on commit 7b8bbd7

Please sign in to comment.