https://github.com/fabiospampinato/css-simple-minifier
A CSS minifier that's tiny and very fast.
https://github.com/fabiospampinato/css-simple-minifier
css fast minifier minify small tiny
Last synced: 4 months ago
JSON representation
A CSS minifier that's tiny and very fast.
- Host: GitHub
- URL: https://github.com/fabiospampinato/css-simple-minifier
- Owner: fabiospampinato
- License: mit
- Created: 2020-01-28T14:44:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-24T16:28:49.000Z (about 2 years ago)
- Last Synced: 2024-11-28T15:41:05.333Z (10 months ago)
- Topics: css, fast, minifier, minify, small, tiny
- Language: JavaScript
- Size: 7.81 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# CSS Simple Minifier
A CSS minifier that's tiny and very fast.
It basically just removes most unnecessary whitespace. Compared to a full-blown minifier it does 95% of the job in 5% of the time.
## Install
```sh
npm install css-simple-minifier
```## Usage
```ts
import minify from 'css-simple-minifier';// Let's make some CSS to minify
const css = `
.foo,
.bar {
color: red;
}.baz {
color: blue;
}
`;// Let's minify that CSS
minify ( css ); // => '.foo,.bar{color: red;}.baz{color: blue;}'
```## License
MIT © Fabio Spampinato