Skip to content

liang610/less-plugin-variables-export

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

less-plugin-variables-export

Adds output of all (not only top-level) variables to a JSON file

Install plugin

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

Command line usage (lessc)

lessc --variables-export <input.less> <output.css>

Variables will be stored in the <input.json> file.

lessc --variables-export=./node_modules/semantic-ui-less/definitions:./node_modules/semantic-ui-less/themes/default <input.less> <output.css>

It should simplify the output when using Semantic UI library.

Programmatic usage

const less = require('less');
const VariablesExport = require('less-plugin-variables-export');

less.render(<css>, {
	plugins: [
		new VariablesExport({
			paths: './node_modules/semantic-ui-less/definitions'
		})
	]
});

Testing

npm test

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%