css-modules-stylus

0.2.0 • Public • Published

css-modules-stylus

Build Status Coverage Status

Stylus preprocessor for CSS Modules required via css-modules-require-hook or babel-plugin-css-modules-transform.

Usage


import hook from 'css-modules-require-hook';
import stylus from 'css-modules-stylus';
 
hook({
    preprocessCss: stylus
});

Stylus Options

Passing options to stylus can be done by creating a default stylus instance using .defaults().

import { defaults as stylus } from 'css-modules-stylus';
 
hook({
    preprocessCss: stylus({
        use: [ plugin() ]
    })
});

Babel Plugin

.babelrc

{
    "plugins": [
        ["css-modules-transform", {
            "preprocessCss": "css-modules-stylus"
        }]
    ]
}

API


cssModulesStylus(contents, filename)

  • contents String The contents of the stylus file.
  • filename String The filename of the stylus file.

.defaults([options])

License


BSD-3-Clause

Copyright (c) 2017 9Technology

Readme

Keywords

none

Package Sidebar

Install

npm i css-modules-stylus

Weekly Downloads

1

Version

0.2.0

License

BSD-3-Clause

Last publish

Collaborators

  • 9technology