0.0.2 • Published 2 years ago
output-less-vars v0.0.2
output-less-vars
Read LESS variables and return them as json.
Example:
@color: #000;
@height: 100px;
Output:
{ "color": "#000", "height": "100px" }
Installation
yarn add output-less-vars
Usage
cmd
output-less-vars --less='./styles.less' --json='./vars.json'
script
const outputLessVars = require("output-less-vars");
outputLessVars({ less: "./styles.less", vars: "./vars.json" }, (content) => console.log(content));
Option
Name | Description | Required |
---|---|---|
less | less file path | true |
json | output json file path | false |