
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
uglify-classes
Advanced tools
This package help you to minify your classnames to optimize size of your app. It's work with a simple CLI, and can be triggered after a build. You can save up to 30% space on CSS files and 20% on HTML files.
![]()
This package help you to minify your classnames to optimize size of your app. It's work with a simple CLI, and can be triggered after a build. You can save up to 30% space on CSS files and 20% on HTML files.
Script will analyze all your css files and detect all classnames. Then it will replace classes in all your assets. You can choose between differents methods to generate minified versions of your classes (hash, random ...).

install it as dev dependencies :
npm install uglify-classes --save-dev
Then, use it after a build (in your package.json) :
"scripts": {
"build": "... && uglify-classes <options>"
},
You can also use it without package.json by install it globally :
npm install -g uglify-classes
Then, use it in your terminal :
uglify-classes <options>
By default, it will replace all your files in dist folder. You can change this by adding a --src option.
| Argument name | Default value | Description |
|---|---|---|
--src <path> | dist/**/* | Glob path to your source files. |
--method <method> | index | Method to generate minified classnames. You can choose between index (default), hash or random. You need to specify a size for theses 2 methods. eg. --method hash:6. |
--prefix | None | Prefix of classes you want to transform. |
--suffix | None | Suffix of classes you want to transform. |
--prepend | _ | Prefix for transformed classes. NB: Make sure the new classname is valid. |
--append | None | Suffix for transformed classes. |
Copyright (c) 2021 Arno Cellarier
This software is released under the terms of the MIT License. See the LICENSE file for further information.
FAQs
This package help you to minify your classnames to optimize size of your app. It's work with a simple CLI, and can be triggered after a build. You can save up to 30% space on CSS files and 20% on HTML files.
The npm package uglify-classes receives a total of 3 weekly downloads. As such, uglify-classes popularity was classified as not popular.
We found that uglify-classes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.