Skip to content

Commit

Permalink
fix(build): rev-all changes
Browse files Browse the repository at this point in the history
  • Loading branch information
balthazar committed Apr 4, 2015
1 parent 1ae4e85 commit 42f70dc
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions app/templates/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,16 +356,22 @@ gulp.task('replace', function () {
});

gulp.task('rev', function () {
return gulp.src('dist/client/**')
.pipe($.revAll({
ignore: ['favicon.ico', '.html'],
quiet: true,
transformFilename: function (file, hash) {
toDelete.push(path.resolve(file.path));
var ext = path.extname(file.path);
return path.basename(file.path, ext) + '.' + hash.substr(0, 8) + ext;

var revAll = new $.revAll({
dontRenameFile: ['index.html', 'favicon.ico'],
transformFilename: function (file, hash) {
var filename = path.basename(file.path);
if (filename === 'index.html' || filename === 'favicon.ico') {
return filename;
}
}))
toDelete.push(path.resolve(file.path));
var ext = path.extname(file.path);
return path.basename(file.path, ext) + '.' + hash.substr(0, 8) + ext;
}
});

return gulp.src('dist/client/**')
.pipe(revAll.revision())
.pipe(gulp.dest('dist/client/'));
});

Expand Down

0 comments on commit 42f70dc

Please sign in to comment.