Ember CLI

Version 0.0.0

The command line interface for ambitious web applications

npm install -g ember-cli

Overview

Ember CLI is the Ember.js command line utility that provides a fast Broccoli-powered asset pipeline, a strong conventional project structure, and a powerful addon system for extension. Get started.

Ember CLI has support for:

In addition to the above, Ember CLI’s addon system provides a way to create reusable units of code, extend the build tool, and more. To view a complete list of addons, please visit emberaddons.

Modules

Ember CLI uses babel, which turns ES2015 module syntax into AMD (RequireJS-esq) modules.

Using a custom resolver, Ember CLI can automatically import modules when needed. For example, the route in routes/post.js will know to use the controller in controllers/post.js and the template in templates/post.hbs. You are not limited to automatic resolution so if your application needs to explicitly include a module, it’s only an import away. Learn more about ES2015 modules here.

Testing using the CLI

All apps built with Ember CLI are preconfigured to use QUnit and Ember QUnit. While these are the default, you are free to use other options such as Mocha and Ember Mocha.

Dependency Management

Ember CLI uses two package managers: Bower, for keeping front-end dependencies (including jQuery, Ember, and QUnit) up-to-date, and npm, for managing internal dependencies. You can use both package managers to introduce your own dependencies.

Runtime Configuration

Ember CLI’s runtime is configurable via a file named .ember-cli. The JSON-formatted file, which must be placed in your home directory, can include any command-line options whose names must be in camel case form. For example:

# ~/.ember-cli
{
  "skipGit" : true,
  "port" : 999,
  "host" : "0.1.0.1",
  "liveReload" : true,
  "environment" : "mock-development",
  "checkForUpdates" : false
}

Content Security Policy

Ember CLI comes bundled with the ember-cli-content-security-policy addon which when running the development server, enables Content Security Policy in modern browsers. When enabled, Content Security Policy mitigates certain types of attacks including Cross Site Scripting (XSS) and data injection. While browser support is not yet universal, Ember CLI makes it easy to build your app with CSP in mind. For example, enabling it on your production stack is as simple as adding these headers.

Community

Ember CLI is continuously evolving. It’s an on-going community effort. We welcome your issues and PRs for features, bug fixes, and anything that would improve your quality of life as an Ember developer.

Talk to us here:

Node

Currently, Ember CLI supports Node (4.0 recommended) and npm (2.x).

Why?

The Ember App Kit (now deprecated) project proved to be quite useful. We’ve learned a lot, and it allowed us to iterate quickly while building real ambitious applications.

While it’s initial incarnation was useful, it had several meta problems:

  1. It was not “simple” and appeared daunting
  2. Because of inline configuration, the API surface area was massive
  3. 2 did not allow users to express the “what”, just the “how”. This prevented Ember App Kit from doing more of the heavy lifting itself
  4. 2 and 3 made it quite tedious to upgrade

Rationale for #3

If we want to upgrade or swap in a faster build pipeline it would be a major pain currently. But with #3, in theory, it should be minimal pain.