# less-to-json-brick

> less 转化成json格式，主要自己使用

Latest version **0.0.10** (published 2020-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install less-to-json-brick
pnpm add less-to-json-brick
yarn add less-to-json-brick
bun add less-to-json-brick
```

Provides the command `lessto`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2020-07-17 |
| First published | 2020-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 12.2 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | ludan and shiweize |
| Maintainers | danlu |
| Keywords | less, json, convert |

## Links

- npm: https://www.npmjs.com/package/less-to-json-brick
- npm.io page: https://npm.io/package/less-to-json-brick

## Dependencies (5)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [less](https://npm.io/package/less.md) ^3.9.0
- [path](https://npm.io/package/path.md) ^0.12.7
- [log4js](https://npm.io/package/log4js.md) ^4.0.2
- [commander](https://npm.io/package/commander.md) ^2.19.0

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

- 0.0.10 (latest) — 2020-07-17
- 0.0.9 — 2020-07-17
- 0.0.8 — 2020-07-16
- 0.0.7 — 2020-07-16
- 0.0.6 — 2020-07-16
- 0.0.5 — 2020-07-16
- 0.0.4 — 2020-07-16
- 0.0.3 — 2020-07-16
- 0.0.2 — 2020-07-16
- 0.0.1 — 2020-07-16

## README

# less to json brick
将less 文件转化成 json 文件过程，展示之后是json 文件

## 安装

``` shell
$ npm install less-to-json-brick
```

## 使用
``` javascript
const lessToJson = require('less-to-json-brick');

let result = lessToJson(`
   .a {
        background: #000;
        border: 1px solid #000;
        .b {
            margin: 1px;
            .c{
                background: #fff;
                div{
                border: 1px solid #000;
                }
            }
        }
  }
`)

// {
//     "background":"#000",
//     "htmlName":".a",
//     "border":"1px solid #000",
//     "child": {
//         "margin":"1px",
//         "htmlName":".b",
//         "child": {
//             "background":"#fff",
//             "htmlName":".c",
//             "child": {
//                 "border":"1px solid #000",
//                 "htmlName":"div"
//             }
//         }
//     }
// }
```

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