O'Reilly logo

CoffeeScript Application Development Cookbook by Mike Hatfield

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Compiling our source with Grunt

In our development environment, we can get away with having our browser compile our CoffeeScript. In production, however, this introduces an unwelcomed decrease in performance. In this section, we will use a tool called Grunt to prepare our source for production by compiling the CoffeeScript into JavaScript as well as combining and minifying our code into a single source file.

Grunt is a task runner similar to Rake for Ruby developers, Ant for Java developers, or NAnt for .NET developers.

In this section, we will use Grunt to compile our CoffeeScript and concatenate it into a single JavaScript file better suited to be used by our application in production.

Getting ready

The first step is to install Grunt. Grunt comes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required