rollup-plugin-stylus-compiler
A rollup plugin to compile stylus file (.styl or .stylus
) to css file. This plugin only integrates stylus to do the compile job.
Need other plugin to deal with the compiled css content. Such as:
- rollup-plugin-css-porter - output css to a standalone file, also with a minified version
- rollup-plugin-css-only - output css to a standalone file.
- rollup-plugin-postcss - inline css into module
Supported rollup version :
plugin version | rollup version |
---|---|
1.x | 1.x |
0.4.x | 0.48.0~0.68.2 |
0.1.0~0.3.x | 0.36.0~0.47.6 |
Installation
Use npm
:
npm install --save-dev rollup-plugin-stylus-compiler// ornpm i -D rollup-plugin-stylus-compiler
Use yarn
:
yarn add rollup-plugin-stylus-compiler --dev
Usage
rollup-plugin-css-porter plugin
Case 1: use with;;; ;
Output bundle.css
and bundle.min.css
.
rollup-plugin-postcss plugin
Case 2: use with;;; ;
Inline css to bundle.js
.
rollup-plugin-css-only plugin
Case 3: use with;;; ;
Output bundle.css
.
Build
Use npm
:
npm run build
Use yarn
:
yarn run build
Run test
Use npm
:
npm test
Use yarn
:
yarn test