less-plugin-js-vars

3.0.1 • Public • Published

Less Plugin JS Vars

A less css plugin that let's use js vars all over the place.

Installation

npm install --save-dev less-plugin-js-vars

Usage

lessc file.less --js-vars="vars.js"

In the above, the file vars.js must export an object with key value pairs. Inside your less files all occurences of {{variable}} will be replaced with the value of the 'variable' property on the exported object.

vars.js:

module.exports = {

   fruit: 'mango'

};

file.less:

.__fruit__ {

   color: red;

}

result:

.mango {

  color: red;

}

Package Sidebar

Install

npm i less-plugin-js-vars

Weekly Downloads

6

Version

3.0.1

License

Apache-2.0

Unpacked Size

3.77 kB

Total Files

5

Last publish

Collaborators

  • metasansana