2.0.0-beta.1 • Published 8 years ago
rollup-plugin-stylus-plus v2.0.0-beta.1
rollup-plugin-stylus-plus
A Rollup.js plugin to compile and load Stylus with CSS Modules. Powered by rollup-plugin-stylus-css-modules!
Installation
npm install --save-dev rollup-plugin-stylus-plusUsage
Add the following code to your project's rollup.config.js:
import stylus from 'rollup-plugin-stylus-plus';
export default {
input: 'index.js',
plugins: [
stylus({
output: 'styles.css'
}),
]
};in Stylus
.container
height 100%in JS
import styles from './styles.styl';
const container = `<div class="${styles.container}">...</div>`;Options
include,exclude: A minimatch pattern, or an array of minimatch patterns of including ID, or excluding ID (optional).output: Output destination (optional).- If you specify a
string, it will be the path to write the generated CSS. - If you specify a
function, call it passing the generated CSS as an argument.
- If you specify a
sourcemap: Iftrueis specified, source map to be embedded in the output CSS (default istrue).plugins: Afunctioninvoked with the Stylus renderer (it will be passed touse()function of the Stylus).
License
MIT
2.0.0-beta.1
8 years ago
2.0.0-beta.0
8 years ago