Skip to content

Command Line use of LESS

mikebridge edited this page May 11, 2012 · 13 revisions

Some examples of how to use LESS on the command line to compile .less files to .css. For GUI compilers see this page.

Cross Platform

Wro4j Runner CLI

Download the wro4j-runner.jar file and run the following command:

java -jar wro4j-runner-1.4.1-jar-with-dependencies.jar --preProcessors lessCss

More details can be found here: Wro4j Runner CLI

*nix / OSX

lessc

The binary included in this repository, bin/lessc works with Node.js on *nix and OSX, and has the following usage:

lessc source [destination] [--version] [--compress] [--yui-compress] [--verbose] [--silent] [--no-color] [--include path]

Windows

with Windows Script Host

LESS.js for Windows with this usage:

cscript //nologo lessc.wsf input.less [output.css] [-compress]

or

lessc input.less [output.css] [-compress]

dotless

dotless for Windows can be run like this:

dotless.Compiler.exe [-switches] <inputfile> [outputfile]