Skip to content

Commit b06936a

Browse files
committed
chore(htmlmin): pipe errors to console
Instead of breaking on invalid html, pipe errors to console and continue Fixes aurelia#635
1 parent ecf2415 commit b06936a

File tree

4 files changed

+5
-1
lines changed
  • skeleton-esnext/build/tasks
  • skeleton-esnext-aspnetcore/src/skeleton/build/tasks
  • skeleton-typescript/build/tasks
  • skeleton-typescript-aspnetcore/src/skeleton/build/tasks

4 files changed

+5
-1
lines changed

skeleton-esnext-aspnetcore/src/skeleton/build/tasks/build.js

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ gulp.task('build-system', function() {
2828
// copies changed html files to the output directory
2929
gulp.task('build-html', function() {
3030
return gulp.src(paths.html)
31+
.pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
3132
.pipe(changed(paths.output, {extension: '.html'}))
3233
.pipe(htmlmin({collapseWhitespace: true}))
3334
.pipe(gulp.dest(paths.output));

skeleton-esnext/build/tasks/build.js

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ gulp.task('build-system', function() {
2828
// copies changed html files to the output directory
2929
gulp.task('build-html', function() {
3030
return gulp.src(paths.html)
31+
.pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
3132
.pipe(changed(paths.output, {extension: '.html'}))
3233
.pipe(htmlmin({collapseWhitespace: true}))
3334
.pipe(gulp.dest(paths.output));

skeleton-typescript-aspnetcore/src/skeleton/build/tasks/build.js

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ gulp.task('build-system', function() {
3333
// copies changed html files to the output directory
3434
gulp.task('build-html', function() {
3535
return gulp.src(paths.html)
36+
.pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
3637
.pipe(changed(paths.output, {extension: '.html'}))
3738
.pipe(htmlmin({collapseWhitespace: true}))
3839
.pipe(gulp.dest(paths.output));

skeleton-typescript/build/tasks/build.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ gulp.task('build-system', function() {
2121
"typescript": require('typescript')
2222
});
2323
}
24-
24+
2525
return gulp.src(paths.dtsSrc.concat(paths.source))
2626
.pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
2727
.pipe(changed(paths.output, {extension: '.ts'}))
@@ -34,6 +34,7 @@ gulp.task('build-system', function() {
3434
// copies changed html files to the output directory
3535
gulp.task('build-html', function() {
3636
return gulp.src(paths.html)
37+
.pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
3738
.pipe(changed(paths.output, {extension: '.html'}))
3839
.pipe(htmlmin({collapseWhitespace: true}))
3940
.pipe(gulp.dest(paths.output));

0 commit comments

Comments
 (0)