Is there a something like less.app that can compile LESS into CSS? I don't care about a GUI and don't want to install it via NPM (node.js package manager.)
Using Less. js in the browser is the easiest way to get started and convenient for developing with Less, but in production, when performance and reliability is important, we recommend pre-compiling using Node.
Installation of LESSDowload the Latest Features version of the zip file. Step 2 − Run the setup to install the Node. js on your system. Step 3 − Next, Install LESS on the server via NPM (Node Package Manager).
Pre-compiling LESS into CSS: To compile LESS into CSS, we use the below command in a command prompt. The lessc command lets us precompile our LESS file into a basic CSS file. This helps us in writing modular code using LESS programming and still getting all the benefits of CSS by compiling it into traditional fast CSS.
Although using node.js
version is recommended, you can install less as ruby gem:
sudo apt-get install rubygems1.8 ruby1.8-dev sudo gem install rubygems-update sudo gem update rubygems sudo gem install less
and than use lessc
which is in /var/lib/gems/1.8/bin/lessc
, so you may want to create symlink:
sudo ln -s /var/lib/gems/1.8/bin/lessc /usr/bin/
or add ruby gems dir to PATH
variable:
export PATH=/var/lib/gems/1.8/bin:$PATH
EDIT:
Using lessc
as described here:
Command-line usage
Less comes with a binary, which lets you invoke the compiler from the command-line, as such:
$ lessc styles.less
This will output the compiled CSS to stdout, you may then redirect it to a file of your choice:
$ lessc styles.less > styles.css
To output minified CSS, simply pass the
-x
option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With