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 different path in manifest.json

I am now trying to generate manifest.json file with gulp-rev. What I need is something like this: { "img/image.jpg": "folder/img/image-34c9d558b2.jpg"; } How do I put that "folder" in path there? I was trying to use gulp-rev-collector…
shitwithcode
  • 367
  • 1
  • 5
  • 10
0
votes
0 answers

How to match files that start with a character in gulp filter?

I want to filter the file (vendor.min.js and vendor.min.css) which is starting with vendor and then add revision to it. How to match the files which start with vendor? I tried to give var filterVendor=filter(['!src/main/^vendor*js']); var…
user6747084
0
votes
1 answer

How to exclude only vendor.min.js files in gulp task?

I'm very new to gulp and i wanted to add revision to all the min.js files except vendor.min.js file. var assets = $.useref.assets ( {'searchPath': '.tmp', 'types': ['css', 'js', 'import']} ); ...... `` return gulp.src ( [srcFolder +…
user6747084
0
votes
1 answer

Elixir gulp versioning - allow rev-manifest.js merges instead of ovewrites

I am attempting a way to run gulp for every page separately. Every page has its gulp file and you can gulp for a page only with $ gulp --file=name These gulpfiles are stored under /gulp So my main gulpfile.js has the…
Timothy
  • 4,198
  • 6
  • 49
  • 59
0
votes
2 answers

Integrating GULP with node.js

I have a project in node.js for which I want to automate some backup and revision tasks in GULP. I am able to successfully test following gulp code in terminal and everything working perfectly. The issue comes when I run gulp task from node.js…
Paresh Thakor
  • 1,795
  • 2
  • 27
  • 47
0
votes
1 answer

gulp-rev-collector can't rename my flash files(extension .swf)

When I used the gulp plugin gulp-rev-collector, I already have some rev-manifest files like: "/css/rev-manifest.json", "/js/rev-manifest.json", "/swf/rev-manifest.json", etc. But when I run next task return gulp.src([revDir + '/*/.json', htmlSrc]) …
0
votes
0 answers

gulp-rev creates a directory inside the destination directory

First of all, I would like to say that Gulp (for me) is creating more problems instead of solving them. I wrote a gulpfile that concat some CSS files and put them inside a directory. The code for this task is the following: var config = { …
Victor Leal
  • 1,055
  • 2
  • 12
  • 28
0
votes
1 answer

How to use gulp-rev with file.revHash?

from gulp-rev @ link : https://github.com/sindresorhus/gulp-rev I have wrote a task to simple gulp.task('build-app', function () { return gulp .src([gulpConfig.clientApp + '*.js']) .pipe($.rev()) // i want to get the updated…
Dreamweaver
  • 1,328
  • 11
  • 21
0
votes
1 answer

gulp/minify: index.html gets cryptic extension in file name, how to take advantage?

I am minifying an index.html file with gulp (note: took over this project, build system has been done by former dev). It all works fine, but the gulp task generates a HTML file which has a cryptic extension to it, like: index-bd2c7f58f0.html I…
transient_loop
  • 5,984
  • 15
  • 58
  • 117
0
votes
2 answers

Access file name in the transformed gulp stream

I have the following gulp task configured: var assets = plugins.useref.assets({searchPath: './'}), css = plugins.filter('**/main.css'), html = plugins.filter('**/*.html'); return gulp .src(config.html.srcheader) …
Ssey
  • 65
  • 8
0
votes
1 answer

gulp dependency breaks gulp in the middle

My gulp script was working fine one day, and now this. gulp.task('minify:dashboard', ['inject:dashboard'], function() { var assets; return gulp.src(paths.django.templates.root + '/__dashboard.html') .pipe($.replace('script src="{{…
Yousuf Jawwad
  • 3,037
  • 7
  • 33
  • 60
0
votes
1 answer

Gulp Revisioning

I have been working on how to automate the development process using gulp build system. I am having some issue regarding revisioning of my stylesheets. I have used gulp-rev to generate file with their update revision number but it keeps on creating…
0
votes
1 answer

strange syntax error with gulp-rev

I have a weird problem using gulp-rev after gulp-useref. I am using gulp-useref to concatenate all my angular, jquery, etc. into a file called lib.js. This works fine, but if I use gulp-rev to append the hash to the lib.js filename, visual studio…
MarcusK
  • 31
  • 3
0
votes
1 answer

How to Monkey-Patch Rails to use Gulp-rev-all Manifest.json?

I'm using Rails 4.2, Ruby 2.2 I generated a new app using: rails new app --skip-sprockets All my Gulp Tasks are successfully running (a lot of them: from gulp-changed and gulp-livereload to gulp-minify-css, gulp-uncss and others). Using gulp-rev-all…
0
votes
1 answer

Use gulp-replace-task to use replace in a php file (index.php)

I'm trying to use gulp-replace-task to replace text inside the index.php file. I know this can be done inside a .html, .css and .js file, but can't seem to get it working inside a .php file. Can somebody please help me? This is my…
Facyo Kouch
  • 787
  • 8
  • 26