What Is This Thing?
If you're not familiar with the app Coda (by Panic) and the LESS CSS project (by two guys cooler than me), start by reading about those first. I've written a plugin for Coda that makes working with LESS super easy.
Technical Jargon, Please
It's a Cocoa-based app that runs inside Coda and provides a GUI for the LESS compiler, which is a command-line tool that parses LESS syntax into standard CSS. It runs the command-line tool on all .less files within your website's local directory, either when you click a button or automatically as you save each .less file -- your choice. This happens in the background, so you never have to leave Coda or stop working.
How Do I Use It?
-
Set a Local Path
After installation, select a site (or create a new one) in Coda and set the 'local path' to wherever your site's files are. This tells the plugin where to look for .less files. You only have to do it once per site. Open The Site
Next, open the site by double-clicking the project thumbnail. Then choose 'LESS Compiler' from the plugins menu, which brings up the plugin window.Compile
Click the 'Compile All' button to immediately turn every .less file into a .css file. Or, check the 'auto compile' box and the plugin will compile each .less file every time you save it. Note: when you turn on auto-compile, you'll get a list of the files the plugin is watching. It checks for new ones every 15 seconds, so if you rename, move or create a new .less file, it'll catch those changes.
Frequently Asked Questions
How stable is it?
Very, to my knowledge. I've used it on several projects and haven't managed to crash or hang it. That said, there may be edge-cases I haven't foreseen. If you run into a bug, let me know and I'll fix it. And, as always, back up your stuff.
What if my .less file has errors?
You'll see the error message from the compiler in the plugin window. It's usually pretty helpful. Note that if your .less file has errors, the compiler will NOT update the .css file until you fix them!
What about multiple Coda windows?
Officially, I haven't yet tackled this because I don't work that way myself. But in theory, if you click 'Compile All', the plugin will compile .less files from the project in the active (front) window. Auto-compile, however, won't switch by itself -- you'll need to turn it off and on again to watch files in the new window.
I keep getting a "Site Not Open" error!
Open a site. You gotta have a website actually open in Coda for the plugin to know where it should look for .less files. Also, you have to be in the EDIT panel in Coda for technical reasons having to do with the Coda Plugin API. If you're in the Terminal or Books panel, the compiler won't work. Edit panel is where it's at.
Can you make a LESS plugin for Textmate or Espresso?
Oh man, I'd love to. I'm a Textmate guy myself. But Textmate doesn't have the slick API that Coda does, so it would be much harder to build a reliable app. I haven't ruled it out, though. Maybe when Textmate 2 comes out (you know, in 2034).
By popular demand, it's in the oven.
If I say Bon Jovi is better than Springsteen, will you kill me?
Immediately and violently.
I am an iPhone app store reviewer.
See previous answer.
Why do you have such hatred of iPhone app reviewers?
Paul Graham nails it: "An organization that wins by exercising power starts to lose the ability to win by doing better work." Someone needs to kick Apple in the teeth so that they stop acting like a petulant five year-old.
Version: 1.4 | Release Notes
Setting It Up:
- Install the LESS compiler by following the instructions at lesscss.org.
- Click the download button and unzip the resulting file.
- Quit Coda, then double click the plugin to install it.
Reviews:
- "Wait, this isn't an iPhone app that we can reject for an arbitrary reason? $#@! off, then."
- "He doesn't mean that. See, we're building a platform [...] so it's fine."
- "That's nice, dear."
- "You have to check out the reviews for this product. Hilarious!"
- "Hilarious my ass. As soon as we're done with Psystar, we're coming after you."
Contact:
- Bugs/Feedback: bryan (at) incident57.com
- Complaints: steve.ballmer@microsoft.com