On local development with LESS, CodeKit, and MAMP

I’m always looking for ways to streamline my frontend development work. I was recently introduced to a great tool called CodeKit, which is a great tie-in with MAMP and your text editor of choice. Basically, CodeKit combines the latest frontend tools like Less, Sass, and CoffeeScript; the filesystem modification event handler Guard; and some GUI tools.

Together, this functionality allows you to have CodeKit and MAMP up in the background with CodeKit watching your source files. When you save a file, CodeKit will automatically compile any necessary files using the supported frameworks and then force your browser to reload the page automatically. As soon as I save a .less file in Coda (or Sublime, if I’m just making a quick change) my CSS is instantly recompiled and the browser window has already updated it, without me pressing a button. Slick.

With MAMP this allows me to preview a new post on my dynamically generated site instantly as I’m writing it. Since I use PieCrust as my CMS, this allows me to keep a git repo of my site’s source code and posts (in the form of Markdown files) which are then pushed to my web server. The web server has a post-receive hook that instructs PieCrust to compile to the public directory, and I’m serving the latest content statically automatically on every git push.

This essentially describes my workflow lately, along with Terminal/Transmit work. I’m finding it very efficient!