Have ideas to improve npm?Join in the discussion! »

    less-plugin-js-vars

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

    Install

    npm i less-plugin-js-vars

    DownloadsWeekly Downloads

    17

    Version

    3.0.0

    License

    Apache-2.0

    Unpacked Size

    3.82 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar