-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat) Use gulp-rev for cache busting js and css
When in production, Gulp will revision the minified file names for cache busting purposes.
- Loading branch information
1 parent
14dbb96
commit d1aef1f
Showing
2 changed files
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -323,12 +323,14 @@ gulp.task('scripts', ['clean', 'jshint', 'coffeelint'], function () { | |
.pipe(plugins.angularFilesort()) | ||
.pipe(plugins.ngAnnotate()) | ||
.pipe(plugins.concat('app.js')) | ||
.pipe(plugins.streamify(plugins.rev())) | ||
.pipe(plugins.uglify()) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
.pipe(appFilter.restore()) | ||
.pipe(bowerFilter) | ||
.pipe(plugins.angularFilesort()) | ||
.pipe(plugins.order(['**/angular.min.js'])) | ||
.pipe(plugins.concat('vendor.js')) | ||
.pipe(plugins.streamify(plugins.rev())) | ||
This comment has been minimized.
Sorry, something went wrong.
dustinspecker
Author
Owner
|
||
.pipe(bowerFilter.restore()) | ||
.pipe(gulp.dest(buildJs)); | ||
} else { | ||
|
@@ -408,10 +410,12 @@ gulp.task('style', ['clean'], function () { | |
.pipe(plugins.autoprefixer()) | ||
.pipe(appFilter) | ||
.pipe(plugins.concat('style.css')) | ||
.pipe(plugins.streamify(plugins.rev())) | ||
.pipe(plugins.cssmin()) | ||
.pipe(appFilter.restore()) | ||
.pipe(bowerFilter) | ||
.pipe(plugins.concat('vendor.css')) | ||
.pipe(plugins.streamify(plugins.rev())) | ||
.pipe(plugins.cssmin()) | ||
.pipe(bowerFilter.restore()) | ||
.pipe(gulp.dest(buildCss)); | ||
|
@@ -458,7 +462,7 @@ gulp.task('markup', ['clean'], function () { | |
gulp.task('inject', [<% if (polymer) { %>'components', <% } %>'markup', 'scripts', 'style'], function () { | ||
return gulp.src(build + 'index.html') | ||
.pipe(plugins.inject(gulp.src([ | ||
buildCss + 'vendor.css', | ||
buildCss + 'vendor*.css', | ||
<% if (framework === 'angularstrap' || framework === 'uibootstrap') { %>buildCss + 'bootstrap.css', | ||
<% } %><% if (framework === 'foundation') { %>buildCss + 'normalize.css', | ||
buildCss + 'foundation.css', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7329ad3 Fixed