Closed rapidfixer closed 9 years ago
You can filter it out with gulp-filter.
@rapidfixer, you should use other means of removing the file from gulp-rev
's input, for example using gulp-filter, like this:
var rev = require('gulp-rev');
var filter = require('gulp-filter');
var skipFilesFilter = filter(function(file){
return /skipthisfile\.css$/
.test(file.path);
});
gulp.src('static-files/**/*')
// ...transformations...
.pipe(skipFilesFilter)
.pipe(rev())
.pipe(skipFilesFilter.restore())
// ...some more transformations...
.pipe(gulp.dest('output-dir'))
// ...generate and save rev-manifest.json...
Of course, you don't have to invoke same filter when calling gulp-rev-manifest
, since the removed file is not kept in the list of revisioned files.
I've got certain file with filename that should be frozen after gulp-rev. What should i do to tell rev not to add hash to this file? Thanks.