Matt Parkins
Matt Parkins

Reputation: 24688

How do I make LessCSS output css which is then uploaded to webserver

I want to use LessCSS for some of its benefits, but I don't want the user to have to download the less.js file or have it do any processing client side - I don't even want to have LessCSS working on my webserver. I'd like to write some Less, push it through LessCSS and then upload the resulting CSS file to the webserver.

Ideally I'd like LessCSS to process the Less file as when I save it in NetBeans and automagically pop out a css file.

Any ideas where to start?

Upvotes: 2

Views: 5358

Answers (2)

nick d
nick d

Reputation: 31

Have a look at my blog entry (http://blog.nickdamoulakis.com/2012/04/php-less-css-and-cssjs-minify.html) where I list and describe a method I use.

Basically, I have a tab open in my browser that points to my compile.php. Whenever I want to 'compile' files, I just press F5 and it compiles JS-->MIN.JS, LESS-->CSS and CSS-->MIN.CSS. An INI file specifies which directories to process.

It is not a fully automated process but it works for what I need it to do. I hope it is of use to you.

Upvotes: 3

zim2411
zim2411

Reputation: 628

Check out SimpLESS. It's a standalone application, but it will monitor a folder for changes in .LESS files and auto compile them into CSS.

Upvotes: 2

Related Questions