1

This is a real question... Is there a way to use less.js as it could generate static css files, those files that will be cached and reprocessed on demand and not on the fly ?

That means generate css cached files to avoid on the fly generation and leverage performance benefits of static files, but keeping the flexibility of writing in less.

This is more way interesting when using css framework like bootstrap, with the need of reusing less variables.

This is supposed to be used in a production environment (we don't own nor control) by webdesigners who are not able to install anything on the server side.

Thanks a lot for any answer !

sugardaddy
  • 23
  • 1
  • 6
  • Take a look at [grunt-contrib-less](https://github.com/gruntjs/grunt-contrib-less). – Mike Oct 22 '13 at 12:03
  • I thought about something lighter that doesn't require any installation on the server side... this intend to be used by newbies ;-) – sugardaddy Oct 22 '13 at 12:36
  • LESS compiles to CSS, so no, there's no way to generate anything without any installations. You could try searching for some public API in the internet that process, serve and cache your LESS file. – gustavohenke Oct 22 '13 at 15:02
  • Thanks Gustavo. I know yet what you're talking about, that's why I rewrote my question ;-) – sugardaddy Oct 22 '13 at 15:07
  • Is it allowed to put some jars in your server and use java to compile less? http://stackoverflow.com/questions/9739724/java-compiler-for-less-css – benbai123 Oct 22 '13 at 21:55
  • This is not the idea. I like to use client-side technologies as javascript. I think it could be driven by a script but I don't know if it's the right solution and I can't imagine how (as I'm not a developer) – sugardaddy Oct 23 '13 at 08:20
  • Take a look at [this answer](http://stackoverflow.com/a/3178816/1995170), which mentions a `refreshStyles`. Depending on what do you want to achieve, it's possible that this will help :) – Michał Rybak Oct 23 '13 at 12:58

1 Answers1

0

You need some sort of compiler like this: http://wearekiss.com/simpless

David Nguyen
  • 8,368
  • 2
  • 33
  • 49
  • Thanks David. I know these tools... but I'm not looking for desktop tools, nor online converter. – sugardaddy Oct 22 '13 at 15:06
  • @sugardaddy that doesn't make any sense you will need some sort of compiling tool to create a CSS file if you do not want to install anything on a server to compile your LESS file – David Nguyen Oct 22 '13 at 15:09
  • I use less.js and nothing else to compile my less file and don't need anything else. That's the max level required. I meant not install server-side tools... but client-side, it's ok. I was thinking of a sort of js that could do the trick : create a static css file and compile on demand. Today, less.js does create a file in local storage, generated every time the page is loaded. – sugardaddy Oct 22 '13 at 15:14