Ember-CLI

We will look at how to set up a development environment for building applications with Ember.

We'll cover the following

Ember-CLI is used as the tool for developing Ember apps. It establishes conventions on where to store your files, makes it a breeze to add libraries to your bundle, build and test your application, and many more things. Above this, it’s super fast and rebuilds and reloads your app whenever any of your development files change. Let’s see how to work with it.

Setting up Ember-CLI

ember-cli is an npm (Node Package Manager) package, which means you will need to have Node.js installed on your machine.

If you don’t yet have Node.js, head over to nodejs.org to download the package by following their instructions. You could also use your favorite package manager for your operating system.

npm should be installed as part of Node.js, so once the installation has finished, you should be able to run the following command:

$ node -v

The respective version will print out.

Ember-CLI needs at least node version 10, so don’t proceed if your installed version is older.

You’ll also need Git, the version control system, for Ember-CLI to create a new project, so make sure it’s installed on your system.

Once you have the environment Ember-CLI runs in, let’s install the ember-cli package itself using the following command:

$ npm install -g ember-cli

The -g flag instructs npm to install ember-cli globally, so that it is available from everywhere on your machine.

The installation might take a couple of minutes, but once it has run to completion, you should be able to query the version you just installed using the following command:

Ember version

$ ember --version
ember-cli: 3.22.0
node: 12.8.1
os: darwin x64

Your node and OS version strings might be different, and that’s fine.

Below is the terminal widget in which ember-cli is already installed using the above methods. You can type the above command to check the version of ember.

Get hands-on with 1200+ tech skills courses.