Reputation: 2341
I have started using less and find it great but one thing which i don't like is that the output css is compressed/minified - whole output is packed in just one line, while i need an uncompressed css output?
I am using Dead-Simple-LESS-Watch-Compiler-master.js to watch my Less directory and any change i in my less file is compiled into css file.
in my project directory i write command
node less-watch-compiler.js less_di css_dir
Upvotes: 0
Views: 342
Reputation: 25310
If you're using Less from the command-line via lessc
then the default output should be unminified.
If you want to minimize the output you'll have to pass an extra parameter, -x
, see the Less homepage for more details.
If Less is built into your workflow somehow differently you'll need to check for additionally passed parameters.
The script you're referencing includes the parameter, in the function compileCSS
, line 147:
var command = 'lessc -x '+file.replace(/\s+/g,'\\ ')+' '+argvs[1]+'/'+filename.replace(/\s+/g,'\\ ')+'.css';
You can either manually remove the -x
from the command to receive unminified output or edit the script to accept an additional parameter (and then preferably make a pull request to the script author/maintainer).
Upvotes: 3