mirror of
https://github.com/theoludwig/html-w3c-validator.git
synced 2024-12-08 00:45:37 +01:00
docs: update description
This commit is contained in:
parent
8934ac1b7a
commit
92320385b5
20
README.md
20
README.md
@ -1,9 +1,7 @@
|
|||||||
<h1 align="center">html-w3c-validator</h1>
|
<h1 align="center">html-w3c-validator</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<strong>CLI for validating multiple html pages using <a href="https://validator.w3.org/">validator.w3.org</a>.</strong>
|
<strong>CLI for validating HTML pages using <a href="https://validator.w3.org/">validator.w3.org</a>.</strong>
|
||||||
</p>
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@ -22,11 +20,11 @@
|
|||||||
|
|
||||||
## 📜 About
|
## 📜 About
|
||||||
|
|
||||||
**html-w3c-validator** is a CLI tool to validate multiple html pages using [validator.w3.org](https://validator.w3.org/).
|
**html-w3c-validator** is a CLI tool to validate HTML pages using [validator.w3.org](https://validator.w3.org/).
|
||||||
|
|
||||||
You might use a JavaScript framework or simply use HTML but **you should always validate your production HTML** and this validation should be part of your CI/CD pipeline (tests, linting, etc.).
|
You might use a JavaScript framework or simply use HTML but **you should always validate your production HTML** and this validation should be part of your CI/CD pipeline (tests, linting, etc.).
|
||||||
|
|
||||||
### Why should I validate my HTML pages?
|
### Why is HTML page validation important?
|
||||||
|
|
||||||
Quote from [https://validator.w3.org/docs/help.html#why-validate](https://validator.w3.org/docs/help.html#why-validate):
|
Quote from [https://validator.w3.org/docs/help.html#why-validate](https://validator.w3.org/docs/help.html#why-validate):
|
||||||
|
|
||||||
@ -52,21 +50,21 @@ npm install --save-dev html-w3c-validator start-server-and-test
|
|||||||
|
|
||||||
### `package.json`
|
### `package.json`
|
||||||
|
|
||||||
```json
|
```jsonc
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
// Command to start the server serving your HTML pages (e.g: using vercel/serve)
|
// Command to start the server serving your HTML pages (e.g: using vercel/serve)
|
||||||
"start": "serve \"./build\"",
|
"start": "serve \"./build\"",
|
||||||
|
|
||||||
// Command to validate your HTML pages
|
// Command to validate your HTML pages
|
||||||
"test:html-w3c-validator": "start-server-and-test \"start\" \"http://127.0.0.1:3000\" \"html-w3c-validator\""
|
"test:html-w3c-validator": "start-server-and-test \"start\" \"http://127.0.0.1:3000\" \"html-w3c-validator\"",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `.html-w3c-validatorrc.json`
|
### `.html-w3c-validatorrc.json`
|
||||||
|
|
||||||
```json
|
```jsonc
|
||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/theoludwig/html-w3c-validator/main/schema/html-w3c-validatorrc-schema.json",
|
"$schema": "https://raw.githubusercontent.com/theoludwig/html-w3c-validator/main/schema/html-w3c-validatorrc-schema.json",
|
||||||
|
|
||||||
@ -77,7 +75,7 @@ npm install --save-dev html-w3c-validator start-server-and-test
|
|||||||
"files": ["./index.html", "./about.html"],
|
"files": ["./index.html", "./about.html"],
|
||||||
|
|
||||||
// Specify the severities of the validator messages to report. (default: ["warning", "error"])
|
// Specify the severities of the validator messages to report. (default: ["warning", "error"])
|
||||||
"severities": ["info", "warning", "error"]
|
"severities": ["info", "warning", "error"],
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -101,7 +99,7 @@ See the [./example](./example) folder for practical usage.
|
|||||||
### Options
|
### Options
|
||||||
|
|
||||||
```text
|
```text
|
||||||
--current-working-directory <path> The current working directory (default: process.cwd()).
|
--current-working-directory <path> The current working directory (default: `process.cwd()`).
|
||||||
-V, --version Output the version number.
|
-V, --version Output the version number.
|
||||||
-h, --help Display help for command.
|
-h, --help Display help for command.
|
||||||
```
|
```
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "html-w3c-validator",
|
"name": "html-w3c-validator",
|
||||||
"version": "0.0.0-development",
|
"version": "0.0.0-development",
|
||||||
"description": "CLI for validating multiple html pages using validator.w3.org.",
|
"description": "CLI for validating HTML pages using validator.w3.org.",
|
||||||
"public": true,
|
"public": true,
|
||||||
"types": "module",
|
"types": "module",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -48,7 +48,7 @@ const printResults = (results: Result[]): void => {
|
|||||||
export class HTMLValidatorCommand extends Command {
|
export class HTMLValidatorCommand extends Command {
|
||||||
static override usage = {
|
static override usage = {
|
||||||
description:
|
description:
|
||||||
"CLI for validating multiple html pages using <https://validator.w3.org/>.",
|
"CLI for validating HTML pages using <https://validator.w3.org/>.",
|
||||||
}
|
}
|
||||||
|
|
||||||
public currentWorkingDirectory = Option.String(
|
public currentWorkingDirectory = Option.String(
|
||||||
|
Loading…
Reference in New Issue
Block a user