Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revision CSS & JS #270

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Please see our [gulpfile.js](app/templates/gulpfile.js) for up to date informati
* Automagically compile Sass with [libsass](http://libsass.org)
* Automagically lint your scripts
* Awesome image optimization
* Asset revisioning
* Automagically wire-up dependencies installed with [Bower](http://bower.io)

*For more information on what this generator can do for you, take a look at the [gulp plugins](app/templates/_package.json) used in our `package.json`.*
Expand Down
4 changes: 3 additions & 1 deletion app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"gulp-jshint": "^1.5.3",
"gulp-load-plugins": "^0.8.0",
"gulp-minify-html": "^0.1.6",
"gulp-postcss": "^3.0.0",<% if (includeSass) { %>
"gulp-postcss": "^3.0.0",
"gulp-rev": "^3.0.0",
"gulp-rev-replace": "^0.3.3",<% if (includeSass) { %>
"gulp-sass": "^1.2.4",<% } %>
"gulp-size": "^1.1.0",
"gulp-uglify": "^1.0.1",
Expand Down
2 changes: 2 additions & 0 deletions app/templates/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ gulp.task('html', ['styles'], function () {
.pipe(assets)
.pipe($.if('*.js', $.uglify()))
.pipe($.if('*.css', $.csso()))
.pipe($.rev())
.pipe(assets.restore())
.pipe($.useref())
.pipe($.revReplace())
.pipe($.if('*.html', $.minifyHtml({conditionals: true, loose: true})))
.pipe(gulp.dest('dist'));
});
Expand Down
3 changes: 0 additions & 3 deletions docs/recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
- [Less](less.md)
- [Jade](jade.md)
- [GitHub Pages](gh-pages.md)
- [Asset revisioning](asset-revisioning.md)
- [React](react.md)
- [Nunjucks](nunjucks.md)
- [AWS S3 deployment](aws-s3-deployment.md)


-

*We welcome additional recipes for common use-cases not covered by this generator.*

## Tips for writing a recipe
Expand Down
42 changes: 0 additions & 42 deletions docs/recipes/asset-revisioning.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/recipes/aws-s3-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,3 @@ Run the following command to deploy:
```sh
$ gulp deploy
```

### Tip

It is highly recommended to enable [asset revisioning](docs/recipes/asset-revisioning.md).
2 changes: 2 additions & 0 deletions docs/recipes/jade.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ We want to parse the compiled HTML:
.pipe(assets)
.pipe($.if('*.js', $.uglify()))
.pipe($.if('*.css', $.csso()))
.pipe($.rev())
.pipe(assets.restore())
.pipe($.useref())
.pipe($.revReplace())
.pipe($.if('*.html', $.minifyHtml({conditionals: true, loose: true})))
.pipe(gulp.dest('dist'));
});
Expand Down
3 changes: 3 additions & 0 deletions docs/recipes/nunjucks.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ gulp.task('connect', ['views', 'styles', 'fonts'], function () {
.pipe(assets)
.pipe($.if('*.js', $.uglify()))
.pipe($.if('*.css', $.csso()))
.pipe($.rev())
.pipe(assets.restore())
.pipe($.useref())
.pipe($.revReplace())
.pipe($.if('*.html', $.minifyHtml({conditionals: true, loose: true})))
.pipe(gulp.dest('dist'));
});
```
Expand Down