Wondering what’s next for npm?Check out our public roadmap! »

modular-css-short-namer

0.0.1 • Public • Published

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.

Install

npm i modular-css-short-namer

DownloadsWeekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • avatar