gulp-wp-toolkit
gulp-wp-toolkit copied to clipboard
Update or replace notifications.
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?
I don't mind them - on macOS they aren't noisy, but do give notifications:
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.
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.
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.
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.
Not tried yet, but https://github.com/chrisgreeff/gulp-logger may be another package to consider.
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.
+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!