Skip to content

Commit 4077cbb

Browse files
committed
style(build): add exclude config for rev
Closes #12.
1 parent b1215f5 commit 4077cbb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/templates/tasks/build.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var ngAnnotate = require('gulp-ng-annotate');
2020
var uglify = require('gulp-uglify');<% if (filters.reload === 'livereload') { %>
2121
var replace = require('gulp-replace');<% } %>
2222
var revAll = require('gulp-rev-all');
23+
var revToExclude = require('./config/revFilesToExclude');
2324

2425
var toDelete = [];
2526

@@ -97,10 +98,9 @@ gulp.task('replace', function () {
9798
gulp.task('rev', function () {
9899

99100
var rev = new revAll({
100-
dontRenameFile: ['index.html', 'favicon.ico'],
101101
transformFilename: function (file, hash) {
102102
var filename = path.basename(file.path);
103-
if (filename === 'index.html' || filename === 'favicon.ico') {
103+
if (revToExclude.indexOf(filename) !== -1) {
104104
return filename;
105105
}
106106
toDelete.push(path.resolve(file.path));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* These filenames will not be revisioned.
3+
*/
4+
5+
module.exports = ['index.html', 'favicon.ico'];

0 commit comments

Comments
 (0)