0.1.0-beta.0 • Published 5 years ago

case-check-webpack-plugin v0.1.0-beta.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

About

We should standard file case type to avoid sensitive case problem.

Install

npm i case-check-webpack-plugin

Usage

var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');

var webpackConfig = {
  plugins: [
    new CaseSensitivePathsPlugin({})
    // other plugins ...
  ]
  // other webpack config ...
};

Plugin API

type ValidCaseType = 'kebab' | 'snake';

type CheckInfoType = 'warn' | 'error' | 'none';

interface ICaseCheckOptions {
  caseType: ValidCaseType;
  checkInfoType?: CheckInfoType;
  exclude?: Array<RegExp>;
}
  • caseType (required)

    • 'kebab' e.g. kebab-case
    • 'snake' e.g. snake_case
  • checkInfoType (default is error)

    • 'error' output webpack errors
    • 'warn' output webpack warnings
    • 'none' never output anything
  • exclude (default is [/node_modules/] ) some files you don't want check, such as files in node_modules

0.1.0-beta.1

5 years ago

0.1.0-beta.0

5 years ago