Time for action – creating a release script

The easiest way to prepare your JavaScript for release is to create a script that can be run from the command line. In this example we will use the YUI Compressor, but it works almost identically for Closure. The only difference is the command-line parameters. In this example we create a command-line script that can be run from the Windows command line, that will take the Piano Hero application we wrote in Chapter 7, Piano Hero, and package it up for release. You can find the code for this section in Chapter 10/example10.1.

Before we start, we need to define a folder structure for the application. I like to create a base folder for the application that contains a src folder and a release folder. The base ...

Get HTML5 Web Application Development By Example Beginner's guide 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.