Skip to content

Commit 6cda490

Browse files
committed
Update README.md
1 parent c15000f commit 6cda490

1 file changed

Lines changed: 46 additions & 45 deletions

File tree

README.md

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Install this grunt plugin next to your project's [Gruntfile.js][getting_started] with:
1212

1313
```bash
14-
npm install grunt-html --save-dev
14+
npm install grunt-html -D
1515
```
1616

1717
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
3636

3737
## Options
3838

39-
### `threads`
39+
### `errorlevels`
4040

41-
* Type: `String`, `Boolean`, `Number`
42-
* Default: `auto`, which is the number of threads -1
41+
* Type: `Array`
42+
* Default: `['info', 'warning', 'error']`
4343

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

4653
### `ignore`
4754

@@ -70,6 +77,34 @@ all: {
7077
}
7178
```
7279

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+
73108
### `server`
74109

75110
* Type: `Object`, or a falsy value
@@ -78,6 +113,7 @@ all: {
78113
When `server` is set to a falsy value, the validator is invoked using `java -jar`, which can be considered normal operation.
79114

80115
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+
81117
To start the validator in server mode, use `java -cp "path/to/vnu.jar" nu.validator.servlet.Main <port>`.
82118

83119
```js
@@ -137,55 +173,20 @@ module.exports = function (grunt) {
137173
};
138174
```
139175

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`
176177

177-
* Type: `Boolean`
178-
* Default: `false`
178+
* Type: `String`, `Boolean`, `Number`
179+
* Default: `auto`, which is the number of threads -1
179180

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

182183
## Potential pitfalls
183184

184185
* vnu.jar requires Java 8 environment or up.
185186

186187
## License
187188

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).
189190

190191
[grunt]: https://gruntjs.com/
191192
[getting_started]: https://gruntjs.com/getting-started

0 commit comments

Comments
 (0)