UNPKG

5.85 kBMarkdownView Raw
1
2ember-cli
3==============================================================================
4
5[![Latest npm release][npm-badge]][npm-badge-url]
6[![TravisCI Build Status][travis-badge]][travis-badge-url]
7[![AppVeyor Build Status][appveyor-badge]][appveyor-badge-url]
8[![Test Coverage][coveralls-badge]][coveralls-badge-url]
9[![Code Climate][codeclimate-badge]][codeclimate-badge-url]
10
11[logo]: https://avatars0.githubusercontent.com/u/10262982?v=3&s=150
12[npm-badge]: https://img.shields.io/npm/v/ember-cli.svg
13[npm-badge-url]: https://www.npmjs.com/package/ember-cli
14[travis-badge]: https://img.shields.io/travis/ember-cli/ember-cli/master.svg?label=TravisCI
15[travis-badge-url]: https://travis-ci.org/ember-cli/ember-cli
16[appveyor-badge]: https://img.shields.io/appveyor/ci/embercli/ember-cli/master.svg?label=AppVeyor
17[appveyor-badge-url]: https://ci.appveyor.com/project/embercli/ember-cli/branch/master
18[coveralls-badge]: https://img.shields.io/coveralls/ember-cli/ember-cli/master.svg
19[coveralls-badge-url]: https://coveralls.io/github/ember-cli/ember-cli
20[codeclimate-badge]: https://codeclimate.com/github/ember-cli/ember-cli/badges/gpa.svg
21[codeclimate-badge-url]: https://codeclimate.com/github/ember-cli/ember-cli
22
23The Ember.js command line utility.
24
25
26Features
27------------------------------------------------------------------------------
28
29- Asset build pipeline using [Broccoli.js](http://broccolijs.com/)
30- ES6 transpilation using [Babel](https://babeljs.io/)
31- Project structure conventions using ES6 module syntax
32- Development server including live-reload and API proxy
33- File/Project generator using blueprints
34- Unit, Integration and Acceptance test support using
35 [Testem](https://github.com/testem/testem)
36- Powerful addon system for extensibility
37
38
39Installation
40------------------------------------------------------------------------------
41
42```
43npm install -g ember-cli
44```
45
46Usage
47------------------------------------------------------------------------------
48
49After installation the `ember` CLI tool will be available to you. It is the
50entrypoint for all the functionality mentioned above.
51
52You can call `ember <command> --help` to find out more about all of the
53following commands or visit <https://ember-cli.com/user-guide/> to read
54the in-depth documentation.
55
56
57### Create a new project
58
59```
60ember new my-new-app
61```
62
63This will create a new folder `my-new-app`, initialize a Git project in it,
64add the basic Ember.js project structure and install any necessary npm and
65Bower dependencies.
66
67
68### Create a new addon project
69
70```
71ember addon my-new-addon
72```
73
74This is essentially similar to `ember new` but will generate the structure
75for an ember-cli addon instead.
76
77
78### Build the project
79
80```
81ember build
82```
83
84This will create a `dist` folder and run the build pipeline to generate all
85the output files in it. You can specify `--environment=production` to build
86in production mode, which includes code minification and other optimizations.
87
88
89### Run the development server
90
91```
92ember serve
93```
94
95This will launch a development server that will automatically rebuild your
96project on file changes and serves the built app at <http://localhost:4200/>.
97
98
99### Run the test suite
100
101```
102ember test
103```
104
105This command will start the Testem runner, which will run all your tests from
106the `tests` folder. This command also supports a `--server` option which will
107automatically run tests on file changes.
108
109
110### Generate files
111
112```
113ember generate route foo
114```
115
116This will generate a `route` named `foo`. `route` is an example here and can
117be replaced by any other available blueprint. Blueprints are provided by
118ember-cli itself and any of you installed addons. Run `ember generate --help`
119to see a list of available blueprints in your project and their options.
120
121
122### Install an ember-cli addon
123
124```
125ember install some-other-addon
126```
127
128This will search npm for a package named `some-other-addon`, install it and
129run any additional install steps defined in the addon.
130
131
132Community
133------------------------------------------------------------------------------
134
135- Slack: [Get your invite](https://ember-community-slackin.herokuapp.com/)
136- IRC: #ember-cli on [freenode](https://webchat.freenode.net/?channels=%23ember-cli)
137- Issues: [ember-cli/issues](https://github.com/ember-cli/ember-cli/issues)
138- Website: [ember-cli.com](https://ember-cli.com)
139
140
141Development
142------------------------------------------------------------------------------
143
144Start by cloning the Git project to your local hard drive:
145
146```
147git clone https://github.com/ember-cli/ember-cli.git
148```
149
150### Link `ember` to your development version
151
152
153Running the following command will link the global `ember` utility to your
154local development version:
155
156```
157npm link
158```
159
160Note that the global `ember` CLI utility will automatically relay to any
161project-local ember-cli installation. If you want to use your development
162version there instead run the following command from your Ember.js
163project folder:
164
165```
166npm link ember-cli
167```
168
169Read the official [npm-link documentation](https://www.npmjs.org/doc/cli/npm-link.html)
170for more information.
171
172
173### Run the test suite
174
175```
176npm test
177```
178
179will run ESLint and the "fast" subset of the test suite. Run
180`npm run test-all` for the full test suite which will currently take quite a
181few minutes due to heavy IO and network usage.
182
183ember-cli is using [Mocha](https://mochajs.org/) for its internal tests. If
184you want to run a specific subset of tests have a look at their
185[documentation](https://mochajs.org/#exclusive-tests).
186
187
188## Build the documentation
189
190Use `npm run docs` to build HTML and JSON documentation with YUIDoc and place
191it in `docs/build/`. Please help by improving this documentation.
192
193
194License
195------------------------------------------------------------------------------
196
197This project is licensed under the [MIT License](LICENSE).