You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proofreading and additions to upgrading guide (#37)
* add a lot to upgrading
* proofreading edits and missing links
* fix anchor link
* remove configurations from the TOC
* linting
* move stylesheets and minifying out of legacy folder
* use headers for watchman info
* line break on periods
* fix broken links
Copy file name to clipboardExpand all lines: guides/basic-use/cli-commands.md
+40-45Lines changed: 40 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
In their day to day work, most Ember developers use only a small number of CLI commands.
2
-
We'll cover them here, along with a quick tutorial of how to use the `--help` option.
1
+
In their daily work, most Ember developers use only a small number of CLI commands.
2
+
We'll cover the most common commands here, along with a quick tutorial of how to use the `--help` option. The help option reveals all available commands and options, beyond what this guide covers.
3
3
4
4
## Using the help command
5
5
6
-
For any of the commands below, you can see all of the options available by using the `--help` flag.
6
+
For any CLI commands, you can see all of the options available by using the `--help` flag.
7
7
8
-
For example, `ember --help` will show a list of all available top level commands. Get more detailed help by adding `--help` to the end of any command, like how `ember generate --help` will show a full list of all the types of files you can create using the CLI.
8
+
For example, `ember --help` will show a list of all available top level commands. `ember generate --help` will show a full list of all the types of files you can generate using the CLI.
9
9
10
10
The help command is also the best way to see the aliased or shorthand versions of common commands and options. For example, here are some of the most frequently used abbreviations:
11
11
@@ -38,7 +38,7 @@ The help command is also the best way to see the aliased or shorthand versions o
38
38
39
39
<!-- SCREENSHOT -->
40
40
41
-
## Create an app
41
+
## Create a new app
42
42
43
43
### Format:
44
44
@@ -76,7 +76,10 @@ To stop an Ember server, press `control-c`.
76
76
77
77
`ember serve` takes all of the app's files and turns them into something that can be rendered in the browser. By default, view the app by visiting `http://localhost:4200`. It's a good idea to keep the server running as we work so that we know as soon as we've broken something. The CLI watches the project folders, and will rerender as files change.
78
78
79
-
### Example
79
+
If the local server will not start due to missing dependencies, use
80
+
`npm install` or `yarn install` to get going again.
81
+
82
+
### Example use
80
83
81
84
By default, apps are served at port `4200`, but if you need to change it for some reason, you could visit your app at `http://localhost:3200` by using this command:
82
85
@@ -86,23 +89,24 @@ ember serve --port 3200
86
89
87
90
### Learn more
88
91
89
-
<!-- link to quickstart in the guides -->
92
+
-[Ember Quickstart Guide](https://guides.emberjs.com/release/getting-started/quick-start/#toc_create-a-new-application) for starting a local server
90
93
91
-
## Generate app files
94
+
## Generate more files
92
95
93
96
### Format
94
97
95
98
```bash
96
-
ember generate <type of file><the name to give it>
99
+
ember generate <type-of-file><name-of-your-choice>
97
100
```
98
101
99
102
### What it does
100
103
101
104
`ember generate` creates new files within your app. For example, you can use it to create components, routes, services, models, and more. For a full list, type `ember generate --help`.
102
105
103
-
The new files will contain the necessary boilerplate, they will go in the right place, and the CLI will make sure that file naming conventions are followed. For example, components must always have a dash in their names. Creating files by hand is not recommended because mistakes can lead to confusing error messages.
106
+
The new files will contain the necessary boilerplate, they will go in the right place, and the CLI will make sure that file naming conventions are followed. For example, components must always have a dash in their names.
107
+
To avoid mistakes that are hard to debug, always use the CLI to create files, instead of creating the files by hand.
104
108
105
-
### Example
109
+
### Example use
106
110
107
111
This command will make a component named `packing-list`. There will be three files created in the app: `packing-list.hbs` which will define what it looks like, `packing-list.js` with JavaScript code to handle user interaction, and an integration test (aka rendering test) file called `packing-list-test.js`.
108
112
@@ -112,9 +116,9 @@ ember generate component packing-list
112
116
113
117
### Learn more
114
118
115
-
<!-- link to custom blueprints -->
119
+
-[Ember Quickstart Guide](https://guides.emberjs.com/release/getting-started/quick-start/#toc_define-a-route) for creating a route
116
120
117
-
## Installing dependencies
121
+
## Installing addons
118
122
119
123
### Format
120
124
@@ -124,23 +128,27 @@ ember install <addon-name>
124
128
125
129
### What it does
126
130
127
-
`ember install` is used to install addons within your app. An addon is an npm package that was built for use in an Ember app. Most addons have a name that starts with `ember`. You can find a full list of addons at [EmberObserver.com](https://emberobserver.com). There are addon versions of many popular npm libraries, as well as packages that are unique to Ember. The majority are open source community addons.
131
+
`ember install` is used to install addons within your app. An addon is an npm package that was built especially for use in an Ember app. Most addons have a name that starts with `ember`. You can find a full list of addons at [EmberObserver.com](https://emberobserver.com). There are addon versions of many popular npm libraries, as well as packages that are unique to Ember. The majority are open source community addons.
132
+
By convention, most addons have `ember` in the name, but not all of them.
128
133
129
-
To use npm packages directly, see <!-- LINK --> to learn about the options.
134
+
To use non-addon npm packages directly, see [the Ember.js Guide](https://guides.emberjs.com/release/addons-and-dependencies/managing-dependencies/)
135
+
to dependencies to learn about the options.
130
136
131
-
### Example
137
+
### Example use
132
138
133
-
Here's an example of adding SASS support to your app using <!-- LINK TO CLI SASS -->. SASS is an alternative to writing plain CSS. This is a popular community-maintained addon.
139
+
Here's an example of adding SASS support to your app using [ember-cli-sass](https://github.com/aexmachina/ember-cli-sass). SASS is an alternative to writing plain CSS. This is a popular community-maintained addon.
134
140
135
141
```bash
136
142
ember install ember-cli-sass
137
143
```
138
144
139
145
### Learn more
140
146
141
-
<!-- Link to options for plain npm packages -->
142
-
<!-- Link to writing your own addon -->
143
-
<!-- Link to writing your own wrapper -->
147
+
-[Ember CLI Guide](../using-addons/) for using and choosing addons
148
+
-[The Ember.js Guides](https://guides.emberjs.com/release/addons-and-dependencies/managing-dependencies/) section on Addons and Dependencies
149
+
-[Writing addons](../../writing-addons/) to learn how to make your own addon
150
+
151
+
<!-- Link to writing your own wrapper, once content is done -->
144
152
145
153
## Testing your app
146
154
@@ -152,9 +160,11 @@ ember test [options]
152
160
153
161
### What it does
154
162
<!--alex disable failed-->
155
-
`ember test` runs all of the tests found in the `tests` folder of the app. By default, it runs all the tests once and displays the results. We'll see things like syntax errors, linting problems, deprecations, and failed assertions in the command line output. By default, these tests are run in Headless Chrome. What headless means is, we won't see the visual output of the browser, but it's running them in a Chrome environment. This makes the test suite faster. To watch tests in the browser as they run, visit `http://localhost:4200/tests` while the local server is running.
163
+
`ember test` runs all of the tests found in the `tests` folder of the app. By default, it runs all the tests once and displays the results. We'll see things like syntax errors, linting problems, deprecations, and failed assertions in the command line output. To instead watch tests in the browser as they run, visit `http://localhost:4200/tests` while the local server is running with `ember serve`.
164
+
165
+
By default, these tests are run in Headless Chrome. What headless means is, we won't see the visual output of the browser, but it's running them in a Chrome environment. This makes the test suite faster.
156
166
157
-
### Example
167
+
### Example use
158
168
159
169
To make tests re-run as we change files, we could use the `--server` option:
160
170
@@ -163,6 +173,8 @@ ember test --server
163
173
```
164
174
165
175
### Learn more
176
+
-[The Ember.js Guides about Testing](https://guides.emberjs.com/release/testing/)
177
+
-[The Ember Super Rentals Tutorial](https://guides.emberjs.com/release/tutorial/ember-cli/) which shows step-by-step how to write tests and understand the results
166
178
167
179
## Building the app for deployment
168
180
@@ -174,13 +186,13 @@ ember build [options]
174
186
175
187
### What it does
176
188
177
-
`ember build` takes all of your app files and turns them into a bundle that is minified and transpiled into browser-ready JavaScript code, styles, and html. The bundled files go into a directory called `dist`. This bundle is what can be deployed to a server. By default, it uses the `development` environment configuration.
189
+
`ember build` takes all of your app files and turns them into a bundle that is minified and transpiled into browser-ready JavaScript code, styles, and html. The bundled files go into a directory called `dist`. This bundle is what can be deployed to a server. By default, the `build` command uses the `development` environment configuration.
178
190
179
191
Although you can upload the built files to a server yourself, many Ember projects use a community addon called [ember-cli-deploy](https://github.com/ember-cli-deploy/ember-cli-deploy) to get their apps into production. `ember-cli-deploy` has a plugin system to make it easy to deploy to many cloud vendors. Search [EmberObserver for "deploy"](https://emberobserver.com/?query=deploy) to browse available options.
180
192
181
193
Ember apps can be built with only three environments: development, production, and testing.
182
194
183
-
### Example
195
+
### Example use
184
196
185
197
This command builds the app using the production configuration, so that means by default, it will use maximum minification for best app performance.
186
198
@@ -190,24 +202,7 @@ ember build --environment production
190
202
191
203
### Learn more
192
204
193
-
<!-- what to link to here? something about ember-cli-build -->
194
-
195
-
196
-
<!-- link to guides and maybe super rentals -->
197
-
198
-
199
-
<!--
200
-
## Table of Contents
201
-
Basic use (explain options of each)
202
-
- using the "help" commmand
203
-
- ember new
204
-
- ember server
205
-
- ember generate
206
-
- ember test
207
-
- ember install (incl link to later section on shims for npm packages)
208
-
- feature flags & configurations
209
-
- Environmental variables
210
-
- File tree reference
211
-
- addons/dependencies
212
-
- Upgrading
213
-
-->
205
+
- The [Ember.js Super Rentals Tutorial](https://guides.emberjs.com/release/tutorial/deploying/) has a section on deploying
206
+
- Search community addons for deployment on [EmberObserver](https://emberobserver.com/?query=deploy)
207
+
- Enable feature flags in different environments using the
Copy file name to clipboardExpand all lines: guides/basic-use/deploying.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ The use of HTTPS certificates is best practice for web security and professional
132
132
133
133
Plain old HTTP sites are likely to show your users security warnings and they are vulnerable to man-in-the-middle attacks. HTTPS certificates are available at no cost from many identity and hosting providers. However, even if you have an HTTPS certificate, you will still need a way to redirect any users who visit `http://your-ember-app.com`, for example.
134
134
135
-
The following is a simple http-to-https redirect using [nginx](). Don't forget to include your ssl keys in your config.
135
+
The following is a simple http-to-https redirect using [nginx](https://nginx.org/en/). Don't forget to include your ssl keys in your config.
136
136
137
137
First, make a production build of your app. The results will be saved in the `dist` directory:
0 commit comments