New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

filename-check-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filename-check-webpack-plugin

检查文件的命名风格

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Install

npm i filename-check-webpack-plugin --save-dev

Usage

unified style

const FilenameCheckPlugin = require('filename-check-webpack-plugin');

module.exports = {
  entry: {
    index: './src/index'
  },
  output: {
    path: './dist',
    filename: '[name].js'
  },
  plugins: [
    new FilenameCheckPlugin({
      path: './src',
      all: 'through'
    })
  ]
};

different style

new FilenameCheckPlugin({
  path: './src',
  dir: 'through',
  file: 'underline'
})

custom style

new FilenameCheckPlugin({
  path: './src',
  all: /$[0-9]*^/
})

Params

path

  • type: String
  • required: required
  • desc: the path of checked directories and files

all

  • type: String | RegExp
  • required: optional
  • desc: unified style

built-in styles:

  • underline lowercase letters and numbers, underline the words, for example company_detail01.html
  • through lowercase letters and numbers,through the words, for example company-detail01.html
  • dot lowercase letters and numbers,dot the words, for example company.detail01.html
  • camelcase camelcase style, for example companyDetail01.html
  • pascal pascal style, for example CompanyDetail01.html

default is underline, support custom style, for example all number style

new FilenameCheckPlugin({
  path: './src',
  all: /$[0-9]*^/
})

print the error message

Alt Text

dir

same as param all

file

same as param all

License

MIT

FAQs

Package last updated on 12 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc