Lint and fix Less then compile to CSS.
Example
Javascript API
import lessToCss from 'less-to-css-x';
/**
* @typedef {!object} RenderOptions
* @property {string} source
* @property {string} destination
* @property {(string|boolean)} sourceMap
* @property {(string|boolean)} minify
* @property {boolean} dryRun
* @property {boolean} noFix
*/
// result is a postcss.LazyResult
lessToCss({source: '__tests__/basic.less'}).then((result) => {
console.log(result);
});
Example
CLI
$ ./bin/less-to-css-x.js example.less
Example
Webstorm