# cube-json

> the json processor for cube

Latest version **2.0.1** (published 2016-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install cube-json
pnpm add cube-json
yarn add cube-json
bun add cube-json
```

## 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 | 2.0.1 |
| Published | 2016-07-08 |
| First published | 2016-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fish |
| Maintainers | fish |

## Links

- npm: https://www.npmjs.com/package/cube-json
- Repository: https://github.com/node-cube/cube-json
- Issues: https://github.com/node-cube/cube-json/issues
- npm.io page: https://npm.io/package/cube-json

## Recent versions

- 2.0.1 (latest) — 2016-07-08
- 2.0.0 — 2016-07-08
- 2.0.0-alpha.1 — 2016-07-08

## README

## install

  npm install cube-less

## write a processor

```js
function Processor(cube) {
  this.cube = cube;
}

Processor.info = {
  type: 'style',  //  can be: style|script|template
  ext: '.less'    //  file ext, let cube know which file request should router to this processor
}

/**
 * process code
 * @param  {String}   file     file path, relative to options.root
 * @param  {Object}   options   {root, compress, moduleWrap, qpath}
 * @param  {Function} callback(err, res)
 *                    res {source, code, wraped}
 */
Processor.prototype.process = function (file, options, callback) {
  // your code here
}

module.exports = Processor;
```

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