modular-css-short-namer
v0.0.1
Published
Helper function to make tiny classnames for modular-css
Downloads
3
Maintainers
Readme
modular-css-short-namer
Helper function to make tiny classnames for modular-css. Creates shorter names than modular-css-namer.
Inspired by chielkunkels. Tries to generate strings that start with the same substring to help gzip compression.
Installation
npm install --save modular-css-short-namer
Usage
JS API
var Processor = require("modular-css-core"),
processor = new Processor({
namer : require("modular-css-short-namer")()
});
// ...
Browserify
build.plugin("modular-cssify", {
css : "./style.css",
namer : require("modular-css-short-namer")()
});
// ...
Rollup
rollup({
entry : "./index.js",
plugins : [
require("modular-css-rollup")({
css : "./gen/index.css",
namer : require("modular-css-short-namer")()
})
]
});
License
modular-css-short-namer is licensed under the MIT License.