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.)
7 Answers
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.lessThis will output the compiled CSS to stdout, you may then redirect it to a file of your choice:
$ lessc styles.less > styles.cssTo output minified CSS, simply pass the
-xoption.
13 Comments
lessc styles.less > styles.css).gem_original_require': no such file to load -- v8 (LoadError). In order to fix it, add one more essential ruby gem with the following command: sudo gem install therubyracer"/var/lib/gems/1.8/gems/less-2.2.2/bin/lessc)sudo gem install therubyracer.You can also use this : http://wearekiss.com/simpless with a beautiful GUI and the watching process to automatically update the file when editing.
4 Comments
I have created a wxPython GUI app that uses node.js less compiler. It is on very early stage right now. Everyone's invited to contribute. I'm planning to make it very similar to MacOS's LessCSS App.
3 Comments
One solution is a bash script discussed here: https://www.maltheborch.com/2011/09/less-app-on-linux And available as a gist here: https://gist.github.com/malthe/1234308
It requires node, lessc, and inotify-tools (a small library for watching changes to files.) Simply throw it in a file, make that file executable, then run it with a directory as the argument.
The downside is that while it will watch a directory recursively, it will only compile whichever file was modified--it doesn't have the ability to automatically compile the less files which import the one you're working on.
Update: A similar option is this slightly more complex bash script which adds a few features: http://code.krml.fr/less.app
1 Comment
I know, that this answer is quite "too late", but I recently tried to build a simple gui for linux. With JAVA and the less.js it is not just linux, but cross-platform. Simpless isn't supported anymore (since 1.3 as written in their blog) and Crunch uses Adobe Air which is also out of date.
here is my project: http://project.splashfish.de/Le-css/
Comments
For java there is an open source tool called wro4j.
It uses rhino as underlying engine for compiling less to css, but can also use node.js if it is supported on your environment.
#apt-get install node-less, then$lessc styles.less.