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

mangle-css-class-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mangle-css-class-webpack-plugin - npm Package Compare versions

Comparing version 4.0.8 to 4.0.9

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [4.0.9](https://github.com/sndyuk/mangle-css-class-webpack-plugin/compare/v4.0.8...v4.0.9) (2020-02-22)
### [4.0.8](https://github.com/sndyuk/mangle-css-class-webpack-plugin/compare/v4.0.7...v4.0.8) (2020-02-22)

@@ -7,0 +9,0 @@

@@ -34,2 +34,9 @@ const chalk = require('./chalk');

const newClassName = `${acceptPrefix[prefixIndex]}${chars.join('')}`
if (opts.reserveClassName && opts.reserveClassName.includes(newClassName)) {
if (opts.log) {
console.log(`The class name has been reserved. ${chalk.green(newClassName)}`);
}
this.newClassSize++;
return this.generateClassName(original, opts)
}
if (opts.log) {

@@ -36,0 +43,0 @@ console.log(`Minify class name from ${chalk.green(original)} to ${chalk.green(newClassName)}`);

2

package.json
{
"name": "mangle-css-class-webpack-plugin",
"version": "4.0.8",
"version": "4.0.9",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Minifies and obfuscates the class names in your existing JavaScript, CSS, and HTML without any modern css modules.",

@@ -50,8 +50,15 @@ [![Build Status](https://travis-ci.org/sndyuk/mangle-css-class-webpack-plugin.svg?branch=master)](https://travis-ci.org/sndyuk/mangle-css-class-webpack-plugin)

If you want to use the back slash '\' on the regexp, use `\\\\\\\\\\\\\\\\` and `\\\\` to match class names contained both JS and CSS.
If you want to use the back slash `\` on the regexp, use `\\\\\\\\\\\\\\\\` and `\\\\` to match class names contained both JS and CSS.
#### reserveClassName
The class names won't be used.
e.g.
```js
reserveClassName: ['fa', 'fas', 'far'],
```
#### ignorePrefix
The prefix will be ignored from mangling.
e.g.
```
```js
classNameRegExp: '(abc-|efg-)?[cl]-[a-z][a-zA-Z0-9_]*',

@@ -63,5 +70,5 @@ ignorePrefixRegExp: ['abc-', 'efg-'],

#### ignorePrefixRegExp
Same behavior as ignorePrefix.
Same behavior as ignorePrefix.
e.g.
```
```js
classNameRegExp: '((hover|focus|xs|md|sm|lg|xl)(\\\\\\\\\\\\\\\\|\\\\)?:)*tw-[a-z_-][a-zA-Z0-9_-]*',

@@ -68,0 +75,0 @@ ignorePrefixRegExp: '((hover|focus|xs|md|sm|lg|xl)(\\\\\\\\\\\\\\\\|\\\\)?:)*',

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