Formatting options for static revisioned assets generated by gulp-rev or gulp-git-rev: unicorn.css => unicorn[pre]d41d8cd98f[pre].css
npm install gulp-rev-format
> Formatting options for static revisioned assets generated by gulp-rev or gulp-git-rev:
> unicorn.css → unicorn[pre]d41d8cd98f[pre].css
Make sure to set the files to never expire for this to have an effect.
```
$ npm install --save-dev gulp-rev-format
`js
var gulp = require('gulp');
var rev = require('gulp-rev');
var revFormat = require('gulp-rev-format');
gulp.task('default', function () {
return gulp.src('src/.')
.pipe(rev())
.pipe(revFormat({
prefix: '.',
suffix: '.cache',
lastExt: false
}))
.pipe(gulp.dest('dist'))
.pipe(rev.manifest())
.pipe(gulp.dest('dist'));
});
`
##### prefix
Type: string"-"
Default:
Prefix appended to Hash.
##### suffix
Type: string""
Default:
Suffix appended to Hash.
##### lastExt
Type: booleanfalse
Default:
Append formatted Hash just before last extension of a file.
(By default, gulp-rev and this plugin will append the formated Hash just before the first . of a filename)
If true, unicorn.ext1.ext2.css would becomeunicorn.ext1.ext2-
Note with default options, output is the same with gulp-rev: unicorn.css → unicorn-d41d8cd98f.css
Files passed must have passed through gulp-rev, so they would have file.revOrigPath and file.revHash` added (read more).
- gulp-rev's author and maintainers - For their awesome work on gulp-rev
- @lukeed - For suggesting the solution for this task
MIT © Andrei Tamas