Summary: If you use OSX and write HTML, screw the trial version. Buy Hammer. You’ll earn back what you spent on it during the first hour you use it.
I’ve been using Hammer for several months. In-fact I used it throughout my redesign of this site a few months back. Hammer’s developers, Riot, say that it:
… lets you create HTML builds & templates quicker, more efficiently & more conveniently.
They’re not kidding.
Hammer makes writing HTML (or XHTML if you prefer) more efficient because I can use its shortcuts in HTML. Hammer then automatically expands these shortcuts into a finished ‘build.’ Hammer does a helluva lot more besides, but I’ll get to that.
There are two ways to get started with Hammer. Hammer can create a new project for you with a default structure of assets and includes. Currently there’s no way to change Hammer’s default set of files from within the app. If you’re nerdy enough to need to do this — and I expect a lot of people are — show the app’s package contents and navigate to
Contents > Resources > SampleApp to change the default files to your own.
Otherwise, drag any project’s root folder into Hammer’s sidebar and Hammer will begin to watch that folder and apply its magic — taking whatever you do or add to your project, automatically processing it and placing a copy in a ‘Build.’ folder within that project.
Hammer packs in a lot of features:
- HTML Includes
- Finding asset files and automatically completing paths for you
- Sass (but not LESS) and CoffeeScript compilation
- Cleverly adding ‘current’ classes to navigation
- Variables (Yes. In HTML.)
- Automatic browser reloading
- Sharing built projects online
I won’t run through all of Hammer’s features, just the ones that have made my work more efficient. You should try the rest out for yourself.
I often make dozens of HTML templates during a project. There’s a lot of repeated code across them — banners, navigation lists, footers and code a client won’t see, like the contents of the
<head>. Hammer keeps every template in sync because it uses HTML Includes for those common elements. In essence, Hammer
@include tags are just like PHP includes but for regular HTML.
<!-- @include _banner.html -->
There’s no limit to the amount of includes you can use and there’s no real need to keep them organised in folders either, as Hammer will find them anywhere inside your project. Hammer’s HTML Includes are worth the price of the app all on their own.
With images flying in and out of a design project, it can be hard sometimes to keep track of them, particularly when there’s more than one person working with you. With Hammer, there’s no need to know which folder an image is in, just its file name. So instead of writing out the full path to an image, just write:
<img src="<!-- @path banner.png -->">
Hammer finds the image and compiles it to:
Aside: To make things even simpler, I’ve set up a TextExpander snippet so that I only have to type
§img to insert the Hammer shortcut.
Moving assets around a project — for example organising @2x images into their own sub-folder — isn’t a problem as Hammer updates paths across a project every time it builds.
<img src="<!-- @stylesheet /css/* -->
Hammer then compiles all stylesheet links into the templates automatically. The same goes for script files too.
These two or three features alone make Hammer a great tool. So what about any cons?
I’m a LESS, not a Sass user. Hammer doesn’t compile LESS files and Riot tell me they’ve no plans to add LESS compiling to the app. I normally compile LESS files using Codekit but using both apps together isn’t ideal. As much as a prefer LESS and as much as like Codekit, having Hammer do everything for me is a big enough reason for me to switch to Sass. (For God’s sake, nobody tell Jina Bolton I said that.)
There’s a few things Hammer doesn’t do that I’d love the developers to consider. Most obviously, hacking the app’s package contents to customise default project files isn’t ideal. I wish there’s a way that Hammer could link to outside framework files in the same way that Codekit does so I can have a canonical reference set of files I can keep up to date with new versions of scripts etc. There’s also no Windows version, not that I care but it does make working with Windows-based teams a little more tricky.
I’ve worked with Hammer for a few months on several projects. Where I’ve not been able to use it — because other developers haven’t had access to the Hammer Beta (and because they use Windows) — I’ve really missed it.
Hammer’s available now from the Mac App Store. It’s $23.99 so it’s not a cheap utility app. Don’t worry about the money though, Hammer’s worth every penny. There’s a trial version available if you want to see for yourself.
My advice is, if you use OSX and write HTML, screw the trial version. Buy Hammer. You’ll earn back what you spent on it during the first hour you use it.