用 Stream-Notifier 简化 Node.js 流的错误和成功通知
Stream-Notifier 让你轻松地在 Mac、Windows 和 Linux 系统上设置通知,实时了解流处理过程中的错误和成功。
使用 Stream-Notifier 和 Gulp 的示例:
var streamNotifier = require('stream-notifier');
gulp.task('styles', function () {
var notify = streamNotifier('styles');
return gulp.src('src/main.styl')
.pipe(stylus({
use: [jeet(), rupture(), normalize()]
}))
.on('error', notify.error)
// ... 更多处理逻辑
});
376.33KB
文件大小:
评论区