# less-to-css-x

> Lint and fix Less then compile to CSS.

Latest version **1.0.1** (published 2019-08-28) · MIT license · 3 weekly downloads

## Install

```sh
npm install less-to-css-x
pnpm add less-to-css-x
yarn add less-to-css-x
bun add less-to-css-x
```

Provides the command `less-to-css-x`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score; declining downloads.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-08-28 |
| First published | 2019-08-27 |
| Weekly downloads | 3 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8.11.4 |
| Dependencies | 12 |
| Unpacked size | 33.6 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Graham Fairweather |
| Maintainers | xotic750 |
| Keywords | less, css, lint, fix, module, javascript, nodejs, browser |

## Links

- npm: https://www.npmjs.com/package/less-to-css-x
- Repository: https://github.com/Xotic750/less-to-css-x
- Issues: https://github.com/Xotic750/less-to-css-x/issues
- npm.io page: https://npm.io/package/less-to-css-x

## Dependencies (12)

- [less](https://npm.io/package/less.md) ^3.10.3
- [yargs](https://npm.io/package/yargs.md) ^14.0.0
- [cssnano](https://npm.io/package/cssnano.md) ^4.1.10
- [postcss](https://npm.io/package/postcss.md) ^7.0.17
- [prettier](https://npm.io/package/prettier.md) ^1.18.2
- [stylelint](https://npm.io/package/stylelint.md) ^10.1.0
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^9.6.1
- [postcss-less](https://npm.io/package/postcss-less.md) ^3.1.4
- [stylelint-prettier](https://npm.io/package/stylelint-prettier.md) ^1.1.1
- [stylelint-config-prettier](https://npm.io/package/stylelint-config-prettier.md) ^5.2.0
- [stylelint-config-standard](https://npm.io/package/stylelint-config-standard.md) ^18.3.0
- [stylelint-no-unsupported-browser-features](https://npm.io/package/stylelint-no-unsupported-browser-features.md) ^3.0.2

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-08-28
- 1.0.0 — 2019-08-27

## README

<a
  href="https://travis-ci.org/Xotic750/less-to-css-x"
  title="Travis status">
<img
  src="https://travis-ci.org/Xotic750/less-to-css-x.svg?branch=master"
  alt="Travis status" height="18">
</a>
<a
  href="https://david-dm.org/Xotic750/less-to-css-x"
  title="Dependency status">
<img src="https://david-dm.org/Xotic750/less-to-css-x/status.svg"
  alt="Dependency status" height="18"/>
</a>
<a
  href="https://david-dm.org/Xotic750/less-to-css-x?type=dev"
  title="devDependency status">
<img src="https://david-dm.org/Xotic750/less-to-css-x/dev-status.svg"
  alt="devDependency status" height="18"/>
</a>
<a
  href="https://badge.fury.io/js/less-to-css-x"
  title="npm version">
<img src="https://badge.fury.io/js/less-to-css-x.svg"
  alt="npm version" height="18">
</a>
<a
  href="https://bettercodehub.com/results/Xotic750/less-to-css-x"
  title="bettercodehub score">
<img src="https://bettercodehub.com/edge/badge/Xotic750/less-to-css-x?branch=master"
  alt="bettercodehub score" height="18">
</a>
<a
  href="https://coveralls.io/github/Xotic750/less-to-css-x?branch=master"
  title="Coverage Status">
<img src="https://coveralls.io/repos/github/Xotic750/less-to-css-x/badge.svg?branch=master"
  alt="Coverage Status" height="18">
</a>

<a name="module_less-to-css-x"></a>

## less-to-css-x

Lint and fix Less then compile to CSS.

**Example**

Javascript API

```js
import lessToCss from 'less-to-css-x';

/**
 * lessToCss options.
 *
 * @typedef {!object} RenderOptions
 * @property {string} source
 * @property {string} [destination]
 * @property {(string|boolean)} [sourceMap=false]
 * @property {boolean} [minify=false]
 * @property {boolean} [dryRun=false]
 * @property {boolean} [noFix=false]
 */

// 'result' is a postcss.LazyResult
// https://api.postcss.org/LazyResult.html

lessToCss({source: '__tests__/basic.less'}).then((result) => {
  console.log(result);
});
```

**Example**

CLI

```bash
$ less-to-css-x.js --help
Usage: less-to-css-x.js [options] <source> [destination]

Options:
-h, --help        Show help                                          [boolean]
-s, --source-map  Produce a sourcemap, optionally you can set a filename
-m, --minify      Minify the output                                  [boolean]
-d, --dry-run     Execute but do not write any files                 [boolean]
-n, --no-fix      Do not perform automated fixes                     [boolean]
-v, --version     Show version number                                [boolean]

Examples:
less-to-css-x.js example.less
less-to-css-x.js example.less eg.css
less-to-css-x.js --souce-map example.less
less-to-css-x.js --souce-map=eg.css.map example.less

copyright 2019
```

**Example**

Webstorm

![Alt text](images/image1.png?raw=true 'Title')
![Alt text](images/image2.png?raw=true 'Title')

Once up and running you will probably want to change 'Show console' to 'On error'.

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