Friday, April 19, 2013

CoffeeScript Tip: Modular Cakefile

Recently I have been working in CoffeeScript a bit. One of the many nice parts of CoffeeScript is Cake, a lightweight build system that ships with CoffeeScript. If your Cakefile starts to get a bit long, it is a piece of cake (no pun intended) to split it up into more manageable... uh... slices? (Okay, sorry, no more bad cake jokes)


Now anytime you want to define a new task you can put it in its own file in the tasks folder rather than fattening up your Cakefile. If you feel like being extra fancy, check out wrench which will let you load tasks recursively.