less-tree

A batch LESS compiler in Go

Download as .zip Download as .tar.gz View on GitHub

less-tree

GoDoc go report card

A tool to batch your server-side LESS compilations.

less-tree runs lessc on many LESS files at once, increasing the throughput and decreasing the amount of time it takes to do a full compile of all your LESS files.

less-tree assumes your public folder looks like this:

public/
|-- css/
|-- less/
   |-- sub-dir/
      |-- style-sub.less
   |-- _include.less
   |-- style-1.less
   |-- style-2.less

And all you have to do is run:

less-tree public

This will compile every *.less file in the the less subdirectory of public, and put the resulting stylesheets in the css subdirectory, keeping the directory structures intact. Your public directory will now look like this:

public/
|-- css/
   |-- sub-dir/
      |-- style-sub.css
   |-- style-1.css
   |-- style-2.css
|-- less/
   |-- sub-dir/
      |-- style-sub.less
   |-- _include.less
   |-- style-1.less
   |-- style-2.less

Other features:

<Files ".less-tree-cache">
  Order Allow,Deny
  Deny from all
</Files>

Requirements

less-tree doesn’t compile anything on its own (yet), so you’ll need to be able to install a couple of npm nodules

Help

Type less-tree -help to see a full command reference.

License

less-tree is released under the MIT license.