Questions tagged [gulp-rev]

a gulp plugin for static assets revisioning.

gulp-rev is a gulp plugin for static assets revisioning by appending a generated content hash to filenames.

The very basic example of revisioning CSS files:

var gulp = require('gulp');
var rev = require('gulp-rev');

gulp.task('default', function () {
  return gulp.src('src/*.css')
    .pipe(rev())
    .pipe(gulp.dest('dist'));
});

It's important to set files to never expire mode in order to make the plugin work correctly.

51 questions
0
votes
1 answer

Gulp-rev-all leaves old revision file

I'm having problems with my gulp-rev-all task. Everytime I change the code, it will generate a new revision file, but leave the old one there. Here is my gulp task: var gulp = require('gulp'); var RevAll =…
Facyo Kouch
  • 787
  • 8
  • 26
0
votes
1 answer

Gulp tasks does not work sequentially

I have 4 tasks to clean the build, build styles & javascripts and to create asset manifest. My default task looks like this: gulp.task('default', function(callback) { runSequence('clean', ['styles', 'scripts'], 'version', callback); }); So,…
0
votes
1 answer

gulp-rev-replace on HTML files in subfolders

I'm wondering how to get gulp-rev-replace to replace file references with the same hash across HTML files in subfolders. Considering the following file structure index.html subfolder index.html scripts main.js styles main.scss And the…
NoR
  • 975
  • 1
  • 7
  • 8
0
votes
3 answers

Gulp-rev replacing files with generated hash

I started using Gulp and I want to create a task that renames the files(js,css) with hash and then inject them back into the html. I actually have two functions that do what I want, but I can't figure out how to delete the old file and keep just…
Gabriel Lopes
  • 943
  • 6
  • 11
  • 20
0
votes
1 answer

browser-sync css injection not working for cache-busted css files

I am using gulp-rev to cache-bust my compiled scss files. This means the css injections works only when I don't change anything in my css file. If I change anything, gulp-rev will give the file a different name and browserSync won't know to inject…
Marcel
  • 13
  • 3
-1
votes
1 answer

Apache 2.4 - Never expire to all files, except 'index.html'

I'm using gulp-rev-all for my Angular based WebApp and I don't want to revision index.html. All other files are revisioned by gulp-rev-all, so they will change their names after each deploy. How to tell Apache to not cache index.html (always fetch…
netanalyzer
  • 634
  • 2
  • 6
  • 23
1 2 3
4