This Script is No Longer Needed!I'm happy to announce that the web dev community has finally come together and produced GUI implementations of Less.app for Windows. The previous version of the article follows below. Now all that's left for you to do is get your ass off Windows and start working in a unix environment ;)
Check out SimpLess, and WinLess UPDATE: I've verified that this actually works for Ubuntu as well! Follow this guide to install node.js on Ubuntu
- Purpose: Allow Windows users to compile less files into css upon file save
- Time Needed: 20 minutes
- Computer Skill Level Recommended: Intermediate
Less.app for Windows InstructionsSo our "less.app" will simply be a command line job that monitors your less files. First, you'll need to snag the latest Node.js Windows binaries. (If you don't have 7-Zip, you'll need it to extract the files). Next, extract the files to a location preferably close to the root directory, making sure the path ends in "node". I'll be using E:\node Modify your Windows PATH to include the bin directory of your node download. In my case, I'll append E:\node\bin. Now download the most recent copy of Less.js from GitHub. (The Downloads button on the right allows you to download a zipped version).
ConfigurationThe rest of the tutorial and the code itself assumes you have the following file structure for your projects:
Compiling Less to CSSNow we're finally ready to compile our Less to CSS! Open your less directory in the command prompt. (See a shortcut HERE) Now type the following in the command prompt:
node less.jsThe module first compiles all .less files in the directory to css, and outputs the css file in the css directory. Next, as long as you leave the command prompt open, the module listens for any more changes to any of the .less files. Once it detects a change, it automatically compiles and updates the css file. To stop the module, use CTRL + c.