css-aliases
v1.1.10
Published
Lets you create custom aliases for CSS, less, SASS and etc. properties with an @alias rule
Downloads
4,227
Maintainers
Readme
css-aliases
Install
$ npm install --save css-aliases
Usage
var cssAliasses = require('css-aliases');
var fs = require('fs');
var resourcePath = './style.less'; //or css, scss
var aliasess = {
"@aliasName": "path/to/your/folder"
};
var css = cssAliasses(fs.readFileSync(resourcePath, 'utf8'), resourcePath, aliases)
A javascript file before compilation
@import "@aliasName/css/user.less";
body {
background: #9e9e9e;
}
will become:
@import "path/to/your/folder/css/user.less";
body {
background: #9e9e9e;
}