@posandu/roughclass
v1.0.2
Published
Minify CSS classes
Downloads
2
Readme
@posandu/roughclass
This npm library minifies classnames in HTML files.
From:
<div class="foo bar baz"></div>
.foo.bar {
color: red;
}
.baz {
opacity: 0;
}
To:
<div class="a b c"></div>
.a.b {
color: red;
}
.c {
opacity: 0;
}
Getting Started
Install using npm i @posandu/roughclass
.
const minify = require("@posandu/roughclass");
Usage
minify(css : string , html : string) : object
Returns an object with the minified CSS and HTML.
{
css: '...',
html: '...',
replacedClasses: object
}