# less-plugin-variables-export

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

Latest version **3.0.2** (published 2020-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install less-plugin-variables-export
pnpm add less-plugin-variables-export
yarn add less-plugin-variables-export
bun add less-plugin-variables-export
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2020-06-17 |
| First published | 2018-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >6.0.0 |
| Dependencies | 0 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Craig Michael Thompson |
| Maintainers | kusmierz |
| Keywords | less, plugin, variable, output, json |

## Links

- npm: https://www.npmjs.com/package/less-plugin-variables-export
- Repository: https://github.com/kusmierz/less-plugin-variables-export
- Homepage: https://github.com/kusmierz/less-plugin-variables-export#readme
- Issues: https://github.com/kusmierz/less-plugin-variables-export/issues
- npm.io page: https://npm.io/package/less-plugin-variables-export

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 3.0.2 (latest) — 2020-06-17
- 3.0.1 — 2020-06-02
- 3.0.0 — 2019-03-14
- 2.0.4 — 2019-03-11
- 2.0.3 — 2019-03-11
- 2.0.2 — 2018-10-10
- 2.0.1 — 2018-10-10
- 2.0.0 — 2018-08-16

## README

# 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
```js
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
```

---
_Source: https://npm.io/package/less-plugin-variables-export · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
