styl-modulesify
stylus injector for browserify.
powered by css modules.
Usage
in browserify
//es6// import stylModulesify from "styl-modulesify"var stylModulesify =
in styl ( ex. my-button.styl )
.common composes: rounded from "theme.styl" composes: large from "sizes.css" &:hover border-color: orange.default composes: common.disabled composes: common color: gray border-color: gray
in js ( browserified )
//es6// import myButtonTheme from "my-button.styl"var myButtonTheme = ...'<button class="' + myButtonThemedefault + '" />''<button class="' + myButtonThemedefault + '" disabled />'
Options
options.output
Output path of css-modules.
This is REQUIRED
type: string
required: true
options.csso
If you set true
, You will get an compressed options.output
.
If you not need an restructured-css, set an object { restructure: false }
.
type: boolean or object
required: false
default: false