Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

stylus-variable-loader

0.0.3 • Public • Published

stylus-variable-loader

This is an experimental thing, be careful.

Usage

//vars.styl
$size = 12px;
$padding = 10px 12px;
$color = #FFF;
$expr-color = alpha($color0.5);
$button = {
    $colorwhite,
    $backgroundblack,
    $font-size1.2em
}
//vars.js
import variables from '!!stylus-variable-loader!./path-to/vars.styl';
 
console.log(variables);
 
{
    '$size': '12px',
    '$padding': '10px 12px',
    '$color': '#FFF',
    '$expr-color': 'rgba(255, 255, 255, 0.5)',
    '$button': {
        '$color': 'white',
        '$background': 'black',
        '$font-size': '1.2em'
    }
}
 

Install

npm i stylus-variable-loader

DownloadsWeekly Downloads

99

Version

0.0.3

License

MIT

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • avatar