npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

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

install

npm i puglint-webpack-plugin

Downloadsweekly downloads

8

version

1.0.3

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability