Chapter 11. Packaging and deployment

 

This chapter covers

  • Understanding JavaScript application packaging and assembly
  • Creating a project structure
  • Minimizing and concatenating files and compiling templates
  • Using Grunt.js

JavaScript build tools are, sadly, still at their infancy. A range of products compete to solve the tasks of application assembly: running unit tests, performing linting (ensuring that your JavaScript code is clean), minifying source code, and packaging your application.

The problem with the existing tools is that they tend to be hard to use and give error messages that are hard to understand, even for developers. In addition, the JavaScript community has yet to agree on a standard for managing application dependency and how these dependencies should be bundled with your application. If you’re entering the JavaScript world from more-mature server-side programming languages such as Java and C#, the JavaScript build tools and the assembly pipeline leave a lot to desire.

This chapter is split into two parts. The first part describes the steps that are necessary to assemble and package your Ember.js application into a format that’s suitable for deployment and for sending out to your users’ browsers. The second part explains how to achieve these tasks by using the tool that’s most popular at the time of publication, Grunt.js.

Before you move on, we’ll review the parts of Ember.js you’ll work on in this chapter, as shown in Figure 11.1.

11.1. Understanding JavaScript application packaging and assembly

11.2. Using Grunt.js as your build tool

11.3. Summary

sitemap