title |
---|
Command Line Usage |
Compile
.less
files to.css
using the command line
Heads up! If the command line isn't your thing, learn more about GUIs for Less.
Install with npm
npm install less -g
The -g
option installs the lessc
command available globally. For a specific version (or tag) you can add @VERSION
after our package name, e.g. npm install less@2.7.1 -g
.
Alternatively, if you don't want to use the compiler globally, you may be after
npm i less --save-dev
This will install the latest official version of lessc in your project folder, also adding it to the devDependencies
in your project's package.json
.
Periodically, as new functionality is being developed, lessc builds will be published to npm, tagged as beta. These builds will not be published as a @latest
official release, and will typically have beta in the version (use lessc -v
to get current version).
Since patch releases are non-breaking we will publish patch releases immediately and alpha/beta/candidate versions will be published as minor or major version upgrades (we endeavour since 1.4.0 to follow semantic versioning).
The binary included in this repository, bin/lessc
works with Node.js on *nix, OS X and Windows.
Usage: lessc [option option=parameter ...] <source> [destination]
lessc [option option=parameter ...] <source> [destination]
If source is set to `-' (dash or hyphen-minus), input is read from stdin.
Compile bootstrap.less to bootstrap.css
lessc bootstrap.less bootstrap.css
For all other options, see Less Options.
lessc -s lessc --silent
Stops any warnings from being shown.
lessc -v
lessc --version
lessc --help |
|
lessc -h |
Prints a help message with available options and exits.
lessc -M
lessc --depends
Outputs a makefile import dependency list to stdout.
Deprecated.
lessc --no-color
In v2 of less, Clean CSS is no longer included as a direct dependency. To use clean css with lessc, use the clean css plugin.