Skip to content

Commit f47c1a9

Browse files
committed
update readme
1 parent 3b8c95d commit f47c1a9

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,24 @@
55

66
# html-validate-webpack-plugin
77

8-
> An [html-validate.org](https://html-validate.org/) webpack plugin
8+
> An [html-validate.org](https://html-validate.org/) plugin for webpack
99
1010
## About plugin
1111

12-
This plugin is a simple wrapper around the [html-validate.org](https://html-validate.org/) cli.
13-
14-
Validate your html automatically after each webpack compilation; similarly to how you would use eslint and stylelint.
12+
This plugin is a simple wrapper around the [html-validate.org](https://html-validate.org/) cli for automatic validation after each webpack compilation.
1513

1614
## Install
1715

1816
```bash
1917
npm install html-validate-webpack-plugin --save-dev
2018
```
2119

22-
**Note**: Install `html-validate` if you haven't already.
20+
**Note**: Install `html-validate` and create a `.htmlvalidate.json` at the project root with your [configurations](https://html-validate.org/usage/index.html).
2321

2422
```bash
2523
npm install html-validate --save-dev
2624
```
2725

28-
**Note**: Create a `.htmlvalidate.json` file with your configurations. [See this page for instructions](https://html-validate.org/usage/index.html).
29-
3026
## Usage
3127

3228
In your webpack configuration (development builds):
@@ -36,19 +32,23 @@ const HtmlValidatePlugin = require('html-validate-webpack-plugin');
3632

3733
module.exports = {
3834
// ...
39-
plugins: [new HtmlValidatePlugin()],
35+
plugins: [
36+
// ...
37+
new HtmlValidatePlugin(),
38+
// ...
39+
],
4040
// ...
4141
};
4242
```
4343

4444
## Options
4545

46-
You can pass [html-validate.org](https://html-validate.org/) cli options.
46+
You can pass select [html-validate.org](https://html-validate.org/) cli options.
4747

4848
### `path`
4949

5050
- Type: `String`
51-
- Default: `src/**/*`
51+
- Default: `'src/**/*'`
5252

5353
Specifies the directories/files for html-validate to search.
5454

@@ -62,7 +62,7 @@ Specifies the file extensions to use when searching for files in directories.
6262
### `config`
6363

6464
- Type: `String`
65-
- Default: `.htmlvalidate.json`
65+
- Default: `'.htmlvalidate.json'`
6666

6767
Specify a different configuration file.
6868

@@ -75,7 +75,12 @@ Specify a different configuration file.
7575

7676
Specify the run context of html-validate.
7777

78-
**Note:** If you installed html-validate globally, set the value to `true`.
78+
**Note:** If you installed `html-validate` globally, set the value to `true`.
79+
80+
## Features
81+
82+
- `html-validate` [performs all validation locally](https://html-validate.org/#offline) which means you can use `html-validate` and `html-validate-webpack-plugin` offline.
83+
- `html-validate-webpack-plugin` has no dependencies.
7984

8085
## Contributing
8186

0 commit comments

Comments
 (0)