Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
- [grunt] basic configuration for new grunt-contrib-htmlmin task
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhyde committed Nov 3, 2014
1 parent b0a9425 commit a9c1692
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
5 changes: 3 additions & 2 deletions gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ module.exports = (grunt) ->
'uncss:build'
'csso:build'
'clean:styles'
'responsive_images:thumbnails'
'processhtml:build'
'size_report:build'
'htmlmin:build'
'responsive_images:thumbnails'
'tinypng:build'
'size_report:build'
]

###
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Kotsu",
"version": "0.4.9",
"version": "0.4.10",
"title": "Clean, opinionated foundation for new projects — to boldly go where no man has gone before",
"author": "LotusTM",
"private": true,
Expand All @@ -11,6 +11,7 @@
"grunt-browser-sync": "^1.5.3",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-htmlmin": "^0.3.0",
"grunt-contrib-sass": "^0.8.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-csso": "^0.6.3",
Expand Down
24 changes: 24 additions & 0 deletions tasks/grunt-contrib-htmlmin.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
###
Minify HTML
https://github.com/gruntjs/grunt-contrib-htmlmin
Minify HTML code
###
module.exports = ->
@config 'htmlmin',
build:
options:
removeComments: true
collapseWhitespace: true
conservativeCollapse: true
collapseBooleanAttributes: true
removeEmptyAttributes: true
removeScriptTypeAttributes: true
removeStyleLinkTypeAttributes: true
minifyJS: true
minifyCSS: true
files: [
expand: true
cwd: '<%= path.build.root %>'
src: '{,**/}*.html'
dest: '<%= path.build.root %>'
]

0 comments on commit a9c1692

Please sign in to comment.