Stylus Plugin

Description

Allows using Stylus, An expressive, dynamic, robust CSS.

Install

yarn add stylus --dev
// OR
npm install stylus --save-dev

Usage

check Stylus website for more information.

Note

The Stylus plugin generates CSS, Therefor it must be chained prior to the CSSPlugin to be used.

Setup

Import from FuseBox

const {StylusPlugin} = require("fuse-box");

Inject into a chain.

fuse.plugin(
     [StylusPlugin(), CSSPlugin()]
)

Or add it to the main config plugins list to make it available across bundles.

FuseBox.init({
    plugins : [
         [StylusPlugin(), CSSPlugin()]
    ]
});

Require file in your code

import "./styles/main.styl"

Options

StylusPlugin accepts a key/value Stylus object options as a parameter. For example:

fuse.plugin(
    [StylusPlugin({
       compress: true
    }), CSSPlugin()]
)