0.0.1 • Published 7 years ago

modular-css-short-namer v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

modular-css-short-namer

version license Travis Coverage

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.