Grunt is awesome

If you are a web developer, you should try Grunt. If you are some other flavour of software developer, you should still consider it. First though, I should probably explain why!

Grunt is a general-purpose “task runner”, meaning that you specify tasks in advance, then you can run those tasks in groups, or automatically when a file changes. Each of those tasks comes from a plugin, written in JavaScript. Most of the plugins are web development-orientated, but there’s nothing to stop them doing other things.

So, why is it useful? Because now, whenever I edit a CSS file, Grunt automatically combines the files together, adds vendor prefixes, and minifies the result. Whenever I edit a script file, all the scripts are combined and minified. It can automatically optimise images. Plus, whenever any of this happens, it tells LiveReload (browser plugin) so that the page in the browser reflects the changes I’ve made.

Grunt does take a little while to figure out. I used this excellent guide, and it still took a couple of hours to set everything up. But the next time I start a project, it will be much quicker, and it means I get the performance benefits of using combined, minified files without having to maintain them myself.

I mention all this now, because I’m starting on the web page for F!shing. This week I’ve mostly been working on the aesthetics, but there are some small gameplay tweaks too. Here’s a recent screenshot: