Less compiler for Linux

Is there something like less.app that can compile LESS into CSS? I do not care about the GUI and do not want to install it through NPM (node.js package manager.)

+43
compiler-construction linux css less
Aug 30 '11 at 15:36
source share
8 answers

Although using a version of node.js recommended , you can install less as a ruby ​​gem:

 sudo apt-get install rubygems1.8 ruby1.8-dev sudo gem install rubygems-update sudo gem update rubygems sudo gem install less 

but use lessc , which is located in /var/lib/gems/1.8/bin/lessc , so you can create a symbolic link:

 sudo ln -s /var/lib/gems/1.8/bin/lessc /usr/bin/ 

or add ruby ​​pearls to the PATH directory:

 export PATH=/var/lib/gems/1.8/bin:$PATH 

EDIT:

Using lessc as described here :

Command line usage

Less comes with binary, which allows you to call the compiler from the command line:

 $ lessc styles.less 

This will output the compiled CSS to stdout, you can then redirect it to the file of your choice:

 $ lessc styles.less > styles.css 

To output minimized CSS, just go -x .

+49
Aug 30 '11 at 15:46
source share

You can also use this: http://wearekiss.com/simpless with a beautiful graphical interface and browsing process to automatically update the file when editing.

+8
Nov 10 '11 at 15:38
source share

in a fedora or centos distribution you should

 $ sudo yum install rubygems $ sudo yum install gcc-c++ $ sudo yum install ruby-devel $ sudo gem install less $ sudo gem install therubyracer $ lessc yourLessFile.less > yourCssFile.css 
+8
Aug 14 2018-12-12T00:
source share

I created a wxPython graphical application that uses node.js less than the compiler. Now it is at a very early stage. Everyone is welcome. I plan to make it very similar to the MacOS LessCSS application.

https://github.com/luislobo/Lobo-LessCSS-Compiler

+3
Mar 17 2018-12-12T00:
source share

One solution is the bash script discussed here: https://www.maltheborch.com/2011/09/less-app-on-linux And is available here as: https://gist.github.com/malthe/1234308

This requires node, lessc and inotify-tools (a small library for viewing changes in files). Just drop it into a file, make an executable file and run it using the directory as an argument.

The disadvantage is that while it will look at the directory recursively, it will compile any file that has been modified - it does not have the ability to automatically compile fewer files that import the one you are working on.

Update: A similar option is a bit more complicated than the bash script, which adds several functions: http://code.krml.fr/less.app

+2
Apr 28 2018-12-12T00:
source share

I know this answer is pretty "too late", but I recently tried to create a simple gui for linux. With JAVA and less.js, it is not only Linux, but also cross-platform. Simpless is no longer supported (starting with 1.3, as written on their blog), and Crunch uses Adobe Air, which is also deprecated.

here is my project: http://project.splashfish.de/Le-css/

+1
Jul 19 2018-12-12T00:
source share

LΓ©-css from Lucas Dietrich is fine. I have added a configuration file, and I am doing it with several projects: Download Less Now, the LESS CSS compiler . Less now works on any OS with a Java virtual machine.

0
Aug 18 '12 at 19:37
source share

For java, there is an open source tool called wro4j .

It uses rhino as the main engine for compiling less css, but can also use node.js if it is supported in your environment.

0
Oct 19 '12 at 17:50
source share



All Articles