Skip to content

Commit

Permalink
Merge pull request #130 from flibbertigibbet/feature/minify-templates
Browse files Browse the repository at this point in the history
Minify Angular templates
  • Loading branch information
flibbertigibbet committed Sep 10, 2015
2 parents 4ad4b04 + ff0511d commit 4d322b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
19 changes: 16 additions & 3 deletions web/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,19 @@ module.exports = function (grunt) {
}
},

ngtemplates: {
dist: {
options: {
htmlmin: '<%= htmlmin.dist.options %>',
module: 'driver',
usemin: '<%= yeoman.dist %>/scripts/scripts.js'
},
cwd: '<%= yeoman.app %>',
src: ['scripts/**/*.html', 'scripts/views/**/*.html'],
dest: '<%= yeoman.dist %>/scripts/templates.js'
}
},

// ng-annotate tries to make the code safe for minification automatically
// by using the Angular long form for dependency injection.
ngAnnotate: {
Expand Down Expand Up @@ -352,9 +365,7 @@ module.exports = function (grunt) {
src: [
'**/*.{ico,png,txt}',
'.htaccess',
'**/*.html',
'scripts/**/*.html',
'scripts/views/**.*.html',
'*.html',
'images/**/*.{webp}',
'styles/fonts/**/*.*'
]
Expand Down Expand Up @@ -446,11 +457,13 @@ module.exports = function (grunt) {
'clean:dist',
'wiredep',
'useminPrepare',
'ngtemplates',
'concurrent:dist',
'autoprefixer',
'concat',
'ngAnnotate',
'copy:dist',
'cdnify',
'cssmin',
'uglify',
'filerev',
Expand Down
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"grunt-karma": "*",
"grunt-newer": "^1.1.0",
"grunt-ng-annotate": "^0.9.2",
"grunt-angular-templates": "0.5.7",
"grunt-svgmin": "^2.0.0",
"grunt-usemin": "~3.0.0",
"grunt-wiredep": "^2.0.0",
Expand Down

0 comments on commit 4d322b0

Please sign in to comment.