0.1.4 • Published 3 years ago

minify-css-modules-classname v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

minify-css-modules-classname

Node.js CI status npm

Better algorithm for generating classname for css modules

Installation

npm i minify-css-modules-classname

or

yarn add minify-css-modules-classname

Usage

const { minify } = require( 'minify-css-modules-classname' )

const filepath = 'relative/file/path/to/index.module.css'
const localName = 'button'

// options: { alphabet: string, useHash: boolean, prefix: string, suffix: string }
const minified = minify( filepath, localName, options )

// `minified` will be `a-a` with default options for first-time run
// and id will be updated when you invoke `minify` for next time

License

MIT

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago