Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #15

Merged
merged 1 commit into from
Nov 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

## Attention

> You need install Java for working with `node-w3c-validator`
> Visit https://java.com for download Java if you not have it
> You need to install the "Java" for working with `node-w3c-validator`
> Visit https://java.com for downloading the "Java" if you not have it


---
Expand Down Expand Up @@ -154,7 +154,7 @@ Write reporting result to the path

#### `-b, --buffersize <size>`

Increase [maxBuffer](https://nodejs.org/docs/latest-v10.x/api/child_process.html#child_process_child_process_exec_command_options_callback) size to prevent #3, `!!! OUTPUT ERROR` or `Unexpected end of JSON input` errors. This is because [child_process stdout being truncated](https://github.com/nodejs/node/issues/19218) when validator check a lot of files.
Increase [maxBuffer](https://nodejs.org/docs/latest-v10.x/api/child_process.html#child_process_child_process_exec_command_options_callback) size to prevent [`!!! OUTPUT ERROR` or `Unexpected end of JSON input` errors](https://github.com/dutchenkoOleg/node-w3c-validator/issues/3). This is because [child_process stdout being truncated](https://github.com/nodejs/node/issues/19218) when validator check a lot of files.

##### CLI `-b, --buffersize`

Expand Down Expand Up @@ -230,7 +230,7 @@ _Parameters:_

Name | Data type | Description
--- | --- | ---
`err` | `Error / Object.<null>` | if no errors - will be `null`, else - Error object
`err` | `Error / null` | if no errors - will be `null`, otherwise - Error object
`output` | `string` | string with reporting result, if no errors - can be as empty string

### nodeW3CValidator.writeFile(filePath, outputData[, done])
Expand All @@ -241,7 +241,7 @@ _Parameters:_

Name | Data type | Argument | Description
--- | --- | --- | ---
`filePath` | `string` | | if no errors - will be `null`, else - Error object
`filePath` | `string` | | relative path to saving a file
`outputData` | `string / Buffer` | | file output content
`done` | `Function` | _optional_ | if exist - it will asynchronous writes output to the filePath. See [fs.writeFile(file, data, callback)](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)

Expand Down Expand Up @@ -304,6 +304,19 @@ Now you can suppress it
}
```

Or like this with a part of message:

```json
{
"nodeW3Cvalidator": {
"suppressErrors": [],
"suppressWarnings": [
"is not needed and should be omitted"
]
}
}
```

---

## Changelog
Expand Down