Skip to content

Commit

Permalink
fix scss watch tasks broken on syntax error
Browse files Browse the repository at this point in the history
when there is a syntax error in a sass file (theme or core) the npm start command used to hang, forcing the user to stop and restart the task to compile again.
this fix allows to keep the start-task watching/compiling even when there is an error :
- the error is displayed in terminal
- the rest of gulp tasks are not called (no reload in the browser)
- the user can edit the scss files to try a fix without the need to stop/restart the `npm start` command
  • Loading branch information
t-fritsch committed Aug 6, 2023
1 parent 92ee97f commit f2b0316
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ function compileSass() {
file: transformedFile.path,
}, ( err, result ) => {
if( err ) {
console.log( vinylFile.path );
console.log( err.formatted );
callback(err);
}
else {
transformedFile.extname = '.css';
Expand Down

0 comments on commit f2b0316

Please sign in to comment.