gulp-wp-toolkit icon indicating copy to clipboard operation
gulp-wp-toolkit copied to clipboard

Update or replace notifications.

Open craigsimps opened this issue 7 years ago • 7 comments

When working with the gulp-wp-toolkit in Windows 10 I am bombarded with notifications and chimes when tasks run, leading me to consider switching away from the gulp-notify package and instead relying on command line based notifications using a simple console.log or another simple package if one is available.

Looking for feedback on your experience of notifications within the toolkit, are they too much, should there be more or less, any notifications that should be added which aren't?

craigsimps avatar Aug 21 '17 15:08 craigsimps

I don't mind them - on macOS they aren't noisy, but do give notifications:

screenshot 2017-08-22 09 39 15

Typically, I run commands manually so the terminal is open, so I can see when it is finished. The only time separate notifications have been useful is when I'm running a watch in the background.

There's probably a package (like node-pretty-log) that can give nicer looking (coloured text, icons, anything that makes it easier to spot when skimming) feedback just on the command line more than console.log, without also giving OS-level notifications.

GaryJones avatar Aug 22 '17 08:08 GaryJones

There's probably a package that can give nicer looking (coloured text, icons, anything that makes it easier to spot when skimming) feedback just on the command line more than console.log, without also giving OS-level notifications.

Using gulp-util would allow for more custom logging, using colour coordination for tasks/ errors.

craigsimps avatar Aug 22 '17 08:08 craigsimps

Apparently, gulp-util is in the process of being deprecated (splitting into individual packages), and the logging part is being replaced with gulplog.

I've tried using gulplog, but initial indications suggests gulp build:css fails to run when require('gulplog') is called, even though it exists in node_modules. Will debug further.

GaryJones avatar Aug 23 '17 10:08 GaryJones

screenshot 2017-08-23 13 34 21

The only change between the successful build, and the failure, was the inclusion of const logger = require('gulplog'); near the top of the build/css.js file.

GaryJones avatar Aug 23 '17 12:08 GaryJones

Not tried yet, but https://github.com/chrisgreeff/gulp-logger may be another package to consider.

GaryJones avatar Aug 23 '17 13:08 GaryJones

One idea is to allow notifications to be turned on/off through the config:

https://github.com/timothyjensen/gulp-wp-toolkit/blob/9eac322ee21963c23b798f653b7d00146963fc7f/tasks/build/css.js#L134-L136

https://github.com/timothyjensen/gulp-wp-toolkit/blob/9eac322ee21963c23b798f653b7d00146963fc7f/tasks/build/css.js#L151

Then in the config we can add notify: false to disable notifications for a certain asset.

timothyjensen avatar Nov 02 '18 13:11 timothyjensen

+1 for @timothyjensen notify: false. I would prefer to not see them since I can check the terminal window when there are errors/problems. Also, hi @craigsimps!

solepixel avatar Nov 17 '18 22:11 solepixel