You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-45Lines changed: 46 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
Install this grunt plugin next to your project's [Gruntfile.js][getting_started] with:
12
12
13
13
```bash
14
-
npm install grunt-html --save-dev
14
+
npm install grunt-html -D
15
15
```
16
16
17
17
Then add this line to your project's `Gruntfile.js`:
@@ -36,12 +36,19 @@ When combined with a watching task (such as [grunt-contrib-watch][watch]), even
36
36
37
37
## Options
38
38
39
-
### `threads`
39
+
### `errorlevels`
40
40
41
-
* Type: `String`, `Boolean`, `Number`
42
-
* Default: `auto`, which is the number of threads -1
41
+
* Type: `Array`
42
+
* Default: `['info', 'warning', 'error']`
43
43
44
-
Use this option to control the number of threads that grunt-html will use when validating a big number of files. This will spawn as many Java processes as the number of threads.
44
+
Set `errorlevels` to control which error types are returned from the validator. Ignores all other returned types.
45
+
46
+
### `force`
47
+
48
+
* Type: `Boolean`
49
+
* Default: `false`
50
+
51
+
Set `force` to `true` to report errors but not fail the `grunt` task.
45
52
46
53
### `ignore`
47
54
@@ -70,6 +77,34 @@ all: {
70
77
}
71
78
```
72
79
80
+
### `noLangDetect`
81
+
82
+
* Type: `Boolean`
83
+
* Default: `false`
84
+
85
+
Set `noLangDetect` to `true` to [skip the checking of the language of the page](https://github.com/validator/validator#--no-langdetect).
86
+
87
+
### `reporter`
88
+
89
+
* Type: `String`
90
+
* Default: `null`
91
+
92
+
Allows you to modify the output format. By default, this plugin will use a built-in Grunt reporter. Set the path to your own custom reporter or to one of the provided reporters: `checkstyle`, `junit` or `json`.
93
+
94
+
### `reporterOutput`
95
+
96
+
* Type: `String`
97
+
* Default: `null`
98
+
99
+
Specify a filepath to output the results of a reporter. If `reporterOutput` is specified then all output will be written to the given filepath rather than printed to `stdout`.
100
+
101
+
### `absoluteFilePathsForReporter`
102
+
103
+
* Type: `Boolean`
104
+
* Default: `false`
105
+
106
+
Set `absoluteFilePathsForReporter` to `true` to use absolute file paths in generated reports.
107
+
73
108
### `server`
74
109
75
110
* Type: `Object`, or a falsy value
@@ -78,6 +113,7 @@ all: {
78
113
When `server` is set to a falsy value, the validator is invoked using `java -jar`, which can be considered normal operation.
79
114
80
115
Set `server` to an object to start the validator in client mode and connect to an already-running instance of the validator in server mode.
116
+
81
117
To start the validator in server mode, use `java -cp "path/to/vnu.jar" nu.validator.servlet.Main <port>`.
82
118
83
119
```js
@@ -137,55 +173,20 @@ module.exports = function (grunt) {
137
173
};
138
174
```
139
175
140
-
### `errorlevels`
141
-
142
-
* Type: `Array`
143
-
* Default: `'info','warning','error'`
144
-
145
-
Set `errorlevels` to control which error types are returned from the validator. Ignores all other returned types.
146
-
147
-
### `force`
148
-
149
-
* Type: `Boolean`
150
-
* Default: `false`
151
-
152
-
Set `force` to `true` to report errors but not fail the `grunt` task.
153
-
154
-
### `reporter`
155
-
156
-
* Type: `String`
157
-
* Default: `null`
158
-
159
-
Allows you to modify the output format. By default, this plugin will use a built-in Grunt reporter. Set the path to your own custom reporter or to one of the provided reporters: `checkstyle`, `junit` or `json`.
160
-
161
-
### `reporterOutput`
162
-
163
-
* Type: `String`
164
-
* Default: `null`
165
-
166
-
Specify a filepath to output the results of a reporter. If `reporterOutput` is specified then all output will be written to the given filepath rather than printed to `stdout`.
167
-
168
-
### `absoluteFilePathsForReporter`
169
-
170
-
* Type: `Boolean`
171
-
* Default: `false`
172
-
173
-
Set `absoluteFilePathsForReporter` to `true` to use absolute file paths in generated reports.
174
-
175
-
### `noLangDetect`
176
+
### `threads`
176
177
177
-
* Type: `Boolean`
178
-
* Default: `false`
178
+
* Type: `String`, `Boolean`, `Number`
179
+
* Default: `auto`, which is the number of threads -1
179
180
180
-
Set `noLangDetect` to `true`to [skip the checking of the language of the page](https://github.com/validator/validator#--no-langdetect).
181
+
Use this option to control the number of threads that grunt-html will use when validating a big number of files. This will spawn as many Java processes as the number of threads.
181
182
182
183
## Potential pitfalls
183
184
184
185
* vnu.jar requires Java 8 environment or up.
185
186
186
187
## License
187
188
188
-
Copyright Jörn Zaefferer. Licensed under the [MIT license](https://github.com/validator/grunt-html/blob/main/LICENSE).
189
+
Copyright Jörn Zaefferer. Licensed under the [MIT license](LICENSE).
0 commit comments