ca

css-aliases

Lets you create custom aliases for CSS,less, SASS and etc. properties with an @alias rule

Showing:

Popularity

Downloads/wk

1.9K

GitHub Stars

2

Maintenance

Last Commit

2yrs ago

Contributors

3

Package

Dependencies

2

Size (min+gzip)

1.5KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100