Question: Should I be running the same collector on initial build and incremental?
Closed this issue · 1 comments
adjavaherian commented
I'm a little bit stumped by the fact that when I run my default gulp task, the collector will read the rev manifest and properly collect and alter my css. But, when I change a scss file, the watcher dispatches a similar series of tasks, yet the collector doesn't rev the filenames in the css? Am I missing something?
Here's my tasks:
gulp.task('default', function(callback){
runSequence(
'clean',
['watchify', 'sass'],
'revImages',
'revScripts',
'revCollector',
'watch',
'tidyUp',
'nodemon:development',
callback);
});
gulp.task('revCollector', function () {
return gulp.src(['public/**/*.json', 'public/**/*.css' ])
.pipe( revCollector ({
replaceReved: true
}))
.pipe(gulp.dest('public'));
});
gulp.task('watch', function() {
watch(config.sass.srcWatch, batch(function(){
gulp.start('cssUpdate');;
}));
});
gulp.task('cssUpdate', function(callback){
runSequence(
'clean:css',
'sass',
'revImages',
'revScripts',
'revCollector',
callback);
});
After a scss change, the watch task successfully starts the cssUpdate and all looks normal, but the css is unchanged by rev collector.
Manifest looks like this each time:
{
"about-us.jpg": "about-us-5db8b9d7.jpg",
"star.png": "star-88c9acc5.png",
"verified.png": "verified-bc34ee02.png"
}
Any ideas?
adjavaherian commented
Scratch that. It looks like I wasn't returning the pipe from one of my tasks. Thanks.