1.2.1 • Published 3 years ago

html-validate-webpack-plugin v1.2.1

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

html-validate-webpack-plugin

An html-validate.org plugin for webpack

About plugin

This plugin is a simple wrapper around the html-validate.org cli for automatic validation after each webpack compilation.

Install

npm i -D html-validate-webpack-plugin
npm i -g html-validate

Note: You must have html-validate installed globally and create a .htmlvalidate.json at the project root with your configurations.

Usage

In your webpack configuration (development builds):

const HtmlValidatePlugin = require('html-validate-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlValidatePlugin(),
  ],
};

Options

You can pass select html-validate.org cli options.

path

  • Type: String
  • Default: 'src/**/*'

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

extensions

  • Type: array
  • Default: ['html']

Specifies the file extensions to use when searching for files in directories.

config

  • Type: String
  • Default: '.htmlvalidate.json'

Specify a different configuration file.

Note: For your custom configuration omit the .json extension and supply the name only.

Features

  • html-validate performs all validation locally which means you can use html-validate and html-validate-webpack-plugin offline.
  • html-validate-webpack-plugin contains minimal dependencies.

License

MIT

1.2.1

3 years ago

1.2.0

4 years ago

1.1.4

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago