Gulp errors that occur without reloading the browser – such as the styles and styles:lint tasks – require a different approach to in-browser notifications because multiple tasks could both be trying to show notifications at the same time. This could occur when there is both a Sass compilation error AND listing errors.
This PR handles that by creating an additional, in-memory "notifications queue" that tasks can push to, and then once all tasks have run you can show all notifications built up in the queue and then clear it. This all uses the same Notifier utility that was previously created, and an API for creating, formatting, and showing notifications that is very similar to what was previously created for showing notifications that do require a browser refresh.
With the merging of this PR, now ALL notifications that would previously appear only in the console will be shown directly in-browser, including:
Gulp errors that occur without reloading the browser – such as the
styles
andstyles:lint
tasks – require a different approach to in-browser notifications because multiple tasks could both be trying to show notifications at the same time. This could occur when there is both a Sass compilation error AND listing errors.This PR handles that by creating an additional, in-memory "notifications queue" that tasks can push to, and then once all tasks have run you can show all notifications built up in the queue and then clear it. This all uses the same
Notifier
utility that was previously created, and an API for creating, formatting, and showing notifications that is very similar to what was previously created for showing notifications that do require a browser refresh.With the merging of this PR, now ALL notifications that would previously appear only in the console will be shown directly in-browser, including: