Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

Gulp - clear css cache in html

0 votes
19 views
added Jul 5, 2018 in Gulp by Grimloxx Second Warrant Officer (3,370 points)
edited Jul 13, 2018 by LC Marshal
gulp.task('clear-css-cache', function(){
  gulp.src(['index.html'])
    .pipe(replace(/main.css\?v=[0-9]+/g, 'main.css?v='+Date.now()))
    .pipe(gulp.dest('./'));
});

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...