formatting file names generated by gulp-rev.
$ npm install @moshisora/gulp-rev-format-re --save-dev
formatting file names generated by gulp-rev in any form using revision and original filename. new filenames are defined with format params [% %]
.
const rev = require('gulp-rev');
const format = require('gulp-rev-format-re');
gulp.task('default', () => {
gulp.src('./src/*.*')
.pipe(rev())
.pipe(format('[% rev %].[% filename %]'))
.pipe(gulp.dest('./dist'))
.pipe(rev.manifest())
.pipe(gulp.dest('./dist'));
});
[% filename %]
: original filename[% rev %]
: revision added by gulp-rev
The MIT License (MIT)
Copyright 2017~ moshisora