File tree 2 files changed +38
-4
lines changed
2 files changed +38
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ _Run this task with the `grunt htmlmin` command._
30
30
31
31
See the ` html-minifier ` [ options] ( https://github.com/kangax/html-minifier#options-quick-reference ) .
32
32
33
- #### Example
33
+ ### Examples
34
+
35
+ #### Simple Example
34
36
35
37
``` js
36
38
grunt .initConfig ({
@@ -76,7 +78,7 @@ grunt.initConfig({
76
78
files: [{
77
79
expand: true ,
78
80
cwd: ' app' ,
79
- src: [' src/**/*.html' , ' *.html' ],
81
+ src: [' src/**/*.html' , ' *.html' ],
80
82
dest: ' dist'
81
83
}]
82
84
}
@@ -86,6 +88,7 @@ grunt.initConfig({
86
88
grunt .registerTask (' default' , [' htmlmin' ]);
87
89
```
88
90
91
+
89
92
## Release History
90
93
91
94
* 2016-07-19 v2.0.0 Updated html-minifier to v3.0.1. Note that Node.js < 4 isn't supported anymore.
@@ -111,4 +114,4 @@ grunt.registerTask('default', ['htmlmin']);
111
114
112
115
Task submitted by [ Sindre Sorhus] ( http://github.com/sindresorhus )
113
116
114
- * This file was generated on Tue Jul 19 2016 00:45:48 .*
117
+ * This file was generated on Sat Jan 14 2017 15:20:44 .*
Original file line number Diff line number Diff line change 1
- ## Example
1
+ # Examples
2
+
3
+ ## Simple Example
2
4
3
5
``` js
4
6
grunt .initConfig ({
@@ -24,3 +26,32 @@ grunt.initConfig({
24
26
25
27
grunt .registerTask (' default' , [' htmlmin' ]);
26
28
```
29
+
30
+ ## Example with Nested Files
31
+
32
+ ``` js
33
+ grunt .initConfig ({
34
+ htmlmin: { // Task
35
+ dist: { // Target
36
+ options: { // Target options
37
+ removeComments: true ,
38
+ collapseWhitespace: true
39
+ },
40
+ files: { // Dictionary of files
41
+ ' dist/index.html' : ' src/index.html' , // 'destination': 'source'
42
+ ' dist/contact.html' : ' src/contact.html'
43
+ }
44
+ },
45
+ dev: { // Another target
46
+ files: [{
47
+ expand: true ,
48
+ cwd: ' app' ,
49
+ src: [' src/**/*.html' , ' *.html' ],
50
+ dest: ' dist'
51
+ }]
52
+ }
53
+ }
54
+ });
55
+
56
+ grunt .registerTask (' default' , [' htmlmin' ]);
57
+ ```
You can’t perform that action at this time.
0 commit comments