mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 22:21:34 -04:00
Don’t halt Gulp watch on JS/SASS errors
Problem --- You make a minor typo, save the file and your Gulp process dies without you realising. You then spend 5 minutes trying to work out why your changes aren’t appearing, no matter what edits you make. Solution --- Catch errors raised in processing the JS/SASS files and log them, without killing the process. How --- Use a handy plugin called [Gulp PrettyError](https://www.npmjs.com/package/gulp-prettyerror).
This commit is contained in:
@@ -66,6 +66,7 @@ gulp.task('javascripts', () => gulp
|
||||
paths.src + 'javascripts/listEntry.js',
|
||||
paths.src + 'javascripts/main.js'
|
||||
])
|
||||
.pipe(plugins.prettyerror())
|
||||
.pipe(plugins.babel({
|
||||
presets: ['es2015']
|
||||
}))
|
||||
@@ -83,6 +84,7 @@ gulp.task('javascripts', () => gulp
|
||||
|
||||
gulp.task('sass', () => gulp
|
||||
.src(paths.src + '/stylesheets/main*.scss')
|
||||
.pipe(plugins.prettyerror())
|
||||
.pipe(plugins.sass({
|
||||
outputStyle: 'compressed',
|
||||
includePaths: [
|
||||
|
||||
Reference in New Issue
Block a user