stylus-2js-variable-loader

1.0.0 • Public • Published

Original Library https://github.com/FL3NKEY/stylus-variable-loader

stylus-variable-loader

This is an experimental thing, be careful.

Usage

//vars.styl
$size = 12px;
$padding = 10px 12px;
$color = #FFF;
$expr-color = alpha($color, 0.5);
$button = {
	$color: white,
	$background: black,
	$font-size: 1.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'
    }
}

Readme

Keywords

Package Sidebar

Install

npm i stylus-2js-variable-loader

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.49 kB

Total Files

5

Last publish

Collaborators

  • seventharchitect