flawless-compile
Less compilation for flawless builds
Getting Started
npm i -D flawless-compile
Flawless is a class so create a new instance and throw some less at it
var Flawless = var fs = var flawless = var file = fs flawless
But reading and writing files like that is a little cumbersome, do yourself a favour and just pipe stuff in and out
var Flawless = var fs = var flawless = fs
Compile options
paths: './src/' './node_modules/' filename: 'styles.less' compress: true sourceMap: true fs
These are all standard less compile options, with the exception of sourceMap
which is a boolean
and will append the whole source map to the output.
CLI
Specify a file as input or pipe into flawless, either way you can redirect the output where you need it
flawless styles.less > styles.cssflawless < styles.less > styles.css
Most of the options are used to instantiate the flawless constructor
flawless styles.less -p src/,node_modules/ -c --source-map > styles.css
Contributing
Its written in ES6 so to hack on it you’ll need to transpile
clonenpm inpm testnpm run build