puglint-webpack-plugin

1.0.3 • Public • Published

npm node

puglint-webpack-plugin

A Puglint plugin for webpack. You can see more puglint rule.

Requirements

This module requires a minimum of Node v6.9.0 and webpack v4.0.0.

Install

$ npm install puglint-webpack-plugin --save-dev

Then add the plugin to your webpack config. For example:

// webpack.config.js
const PugLintPlugin = require('puglint-webpack-plugin')
const options = {
  context: 'src',
  files: '**/*.pug',
  config: Object.assign({emitError: true}, require('../.pug-lintrc'))
}
 
module.exports = {
  // ...
  plugins: [
    new PugLintPlugin(options),
  ],
  // ...
}

And run webpack via your preferred method.

Options

It takes the following parameters.

context

Type: String Default: compiler.context

A String indicating the root of your PUG files.

files

Type: String Default: undefined

Specify the glob pattern for finding files. Must be relative to options.context.

config

Type: String Default: undefined

Specify the config file location to be used by puglint. You can pass puglint options.

License

MIT

Package Sidebar

Install

npm i puglint-webpack-plugin

Weekly Downloads

20

Version

1.0.3

License

ISC

Unpacked Size

16.9 kB

Total Files

10

Last publish

Collaborators

  • jerry2359