onedesign / generator-one-base

A foundation for One Design Company projects on the web.
Other
1 stars 1 forks source link

Show stylelint issues in-browser and enable in-browser notification queue for gulp tasks. #106

Closed cmalven closed 6 years ago

cmalven commented 6 years ago

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: