Getting started with ember-cli
Remarks#
This section provides an overview of what ember-cli is, and why a developer might want to use it.
It should also mention any large subjects within ember-cli, and link out to the related topics. Since the Documentation for ember-cli is new, you may need to create initial versions of those related topics.
Simple syntax to create a project is :
ember new my-new-app
cd my-new-app
ember sKindly check instruction to setup ember-cli in this document
Installation
Ember-cli first requires Node and NPM to be installed on the system. Either follow the installation instructions on nodejs.org, or use a preferred package manager (such as Homebrew on OSX.) It’s recommended to install latest version of each.
Once its done, run the following commands to ensure installation was correct:
node -v
npm -vSince Yarn package manager has been released recently (October 2016), it’s possible to install dependencies with Yarn instead of NPM. Checking the guide on yarn’s website for further details.
Next, install Ember CLI globally:
npm install -g ember-cliOR
yarn global add ember-cli This will grant access to the ember command-line runner.
BOWER
Globally install Bower, a package manager that keeps front-end dependencies up-to-date. (including jQuery, Ember, and QUnit)
npm install -g bowerOR
yarn global add bowerThis will grant access to the bower command-line runner.
PhantomJS
With Ember CLI, use a preferred automated test runner. Most testing services recommend or require PhantomJS, which can be installed via npm or the PhantomJS website. (PhantomJS is the default test runner for Testem and Karma.)
To use PhantomJS for integration tests, it must be globally installed:
npm install -g phantomjs-prebuiltor
yarn global add phantomjs-prebuiltWatchman
On OSX and UNIX-like operating systems, it is recommended to install Watchman version 4.x. This provides Ember CLI a more effective way for watching project changes.
File-watching on OSX is error-prone and Node’s built-in NodeWatcher has trouble observing large trees. Watchman solves these problems and performs well on extremely massive file trees.
On OSX, install Watchman using Homebrew:
brew install watchmanFor complete installation instructions, refer to the docs on the Watchman website.
Do not use an NPM version of Watchman. The following command can be used to uninstall it:
npm uninstall -g watchmanCongratulations! Now you are able to create your first project by running:
ember new my-first-appstart Ember server by running :
ember sNavigate to https://localhost:4200 to see the new app in action.
Navigate to https://localhost:4200/tests to see the test results in action.