Skip to content

Commit 556c63d

Browse files
committedJan 14, 2017
Update docs.
[ci skip]
1 parent a3ab8d5 commit 556c63d

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed
 

‎README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ _Run this task with the `grunt htmlmin` command._
3030

3131
See the `html-minifier` [options](https://github.com/kangax/html-minifier#options-quick-reference).
3232

33-
#### Example
33+
### Examples
34+
35+
#### Simple Example
3436

3537
```js
3638
grunt.initConfig({
@@ -76,7 +78,7 @@ grunt.initConfig({
7678
files: [{
7779
expand: true,
7880
cwd: 'app',
79-
src: ['src/**/*.html', '*.html'],
81+
src: ['src/**/*.html', '*.html'],
8082
dest: 'dist'
8183
}]
8284
}
@@ -86,6 +88,7 @@ grunt.initConfig({
8688
grunt.registerTask('default', ['htmlmin']);
8789
```
8890

91+
8992
## Release History
9093

9194
* 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']);
111114

112115
Task submitted by [Sindre Sorhus](http://github.com/sindresorhus)
113116

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.*

‎docs/htmlmin-examples.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
## Example
1+
# Examples
2+
3+
## Simple Example
24

35
```js
46
grunt.initConfig({
@@ -24,3 +26,32 @@ grunt.initConfig({
2426

2527
grunt.registerTask('default', ['htmlmin']);
2628
```
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+
```

0 commit comments

Comments
 (0)
Please sign in to comment.