7. Cake and Cakefiles

CoffeeScript offers a simple build tool, called Cake, that is very similar in nature to Ruby’s Rake1 tool. Cake enables you to define simple tasks to help with your CoffeeScript projects. Perhaps you need a task to run your tests or a task to build your files. Cake lets you define those tasks easily in a file called a Cakefile.

In this chapter you’ll learn how to define and execute Cake tasks, and of course, we’ll be doing it all using CoffeeScript.

Tip

“Wait a minute, how do we install Cake?” You don’t have to! When you installed CoffeeScript, the installer also installed Cake and its command-line tool, aptly named cake. You don’t have to do anything extra to get access to this tool.

Getting Started

Before we write our ...

Get Programming in CoffeeScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.