FL3NKEY / stylus-variable-loader

πŸ“ A stylus variables loader for webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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'
    }
}

About

πŸ“ A stylus variables loader for webpack.

License:MIT License


Languages

Language:JavaScript 100.0%