Adds output of all top-level varibles to a JSON file
JavaScript
Switch branches/tags
Nothing to show
Clone or download
craig.thompson
Latest commit c024b1e Jan 25, 2017
Permalink
Failed to load latest commit information.
.vscode Better output file management Jan 25, 2017
lib Better output file management Jan 25, 2017
test Better output file management Jan 25, 2017
.gitignore Initial commit Jan 23, 2017
LICENSE Initial commit Jan 23, 2017
README.md Fix typo Jan 23, 2017
package.json Bump version: 1.2.0 Jan 25, 2017
yarn.lock Better output file management Jan 25, 2017

README.md

less-plugin-variables-output

Adds output of all top-level variables to a JSON file

Install plugin

npm install --save-dev less-plugin-variables-output

Command line usage (lessc)

lessc --variables-output <input.less> <output.css>
lessc --variables-output=customFilename.json <input.less> <output.css>

Programmatic usage

const less = require('less');
const VariablesOutput = require('less-plugin-variables-output');

less.render(<css>, {
	plugins: [
		new VariablesOutput({
			filename: 'variables.json'
		})
	]
});

Testing

npm test