Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 573 Bytes

README.md

File metadata and controls

38 lines (29 loc) · 573 Bytes

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