This package has been deprecated

Author message:

less-json-vars is deprecated, use 'css-preprocessor-variables' instead.

less-json-vars
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

less-json-vars

A plugin for convert less vars to json.

usage

const getLessVariables: (content: string, options?: Partial<Options>) => Record<string, string>;

example

const { getLessVariables } = require('less-json-vars');

const content = '@primary-color: #ffffff;\n @color: #000000';

const variables = getLessVariables(content);

console.log(variables); // { '@primary-color': '#ffffff', 'color': '#000000' }

options

strip (boolean): Whether to remove the prefix. (default false)

debug (boolean): Whether open debug mode. (default false)

format('camelCase' | 'kebabCase' | 'none'): Format key of variables. (default 'none')

transform (boolean): Should transform current variable in values. (default true)

license

MIT

Package Sidebar

Install

npm i less-json-vars

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

8.84 kB

Total Files

10

Last publish

Collaborators

  • fanhaoyuan