less-to-css-x

1.0.1 • Public • Published

Travis status Dependency status devDependency status npm version bettercodehub score Coverage Status

less-to-css-x

Lint and fix Less then compile to CSS.

Example

Javascript API

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

$ 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 Alt text

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

Package Sidebar

Install

npm i less-to-css-x

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

34.4 kB

Total Files

10

Last publish

Collaborators

  • xotic750