Open dvelikiy opened 6 years ago
I'm not sure I understand. What are you trying to achieve? gulp-watch-sass
adds related SASS files to the stream already, so you should only have to pipe gulp-sass
as explained in the usage section.
I understand that. However, it's sometimes useful to have access to chokidar events, such as 'change'.
E. g. (the standard gulp watch mechanism)
var watcher = gulp.watch('js/**/*.js', gulp.parallel('concat', 'uglify')); watcher.on('change', function(path, stats) { console.log('File ' + path + ' was changed'); });
Hello, I am here to ask about the events as well. What I would like to achieve is just to see an information that something has happened in console as confirmation that everything is working well. I had no success with chaining .on('end', ()=>{ console.log('Job done') })
. And as stated in the issue, chokidar's events are not accessible neither. So how do we catch the information that something is happening with gulp-watch-sass? Thatnk you.
Ok, so I tried to substitute gulp-watch with gulp-watch-sass, but it didn't work:
watchSass(SRC_STYLES).on('change', updateRelatedStyles);
I managed to make it work by using gulp-fn:
gulp.task("watch-styles", () => watchSass(SRC_STYLES).pipe(gulpFn(updateRelatedStyles)));
It'd be nice to have the usual 'change' and other events.