Skip to content

Commit 67a50e7

Browse files
authored
Merge pull request #235 from kategengler/kg-npm-commands
Switch ember serve(r) -> npm start
2 parents 6323536 + d9350d1 commit 67a50e7

13 files changed

+35
-35
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -497,13 +497,13 @@ Start a server (background task).
497497
Example:
498498

499499
```run:server:start cwd=super-rentals expect="Serving on http://localhost:4200/"
500-
ember server
500+
npm start
501501
```
502502

503503
Result:
504504

505505
```shell
506-
$ ember server
506+
$ npm start
507507
Build successful (9006ms) – Serving on http://localhost:4200/
508508
```
509509

@@ -574,7 +574,7 @@ Stop a server (background task) previously started with `run:server:start`.
574574
Example:
575575

576576
```run:server:stop
577-
ember server
577+
npm start
578578
```
579579

580580
The content of the source code block is the command used to start the server.
@@ -589,7 +589,7 @@ Options:
589589

590590
## How?
591591

592-
* Requires [Volta](https://volta.sh), `git`
592+
* Requires `git`
593593
* Probably only works on Unix/bash for now (PRs welcome)
594594
* Should probably run the build in a docker container anyway
595595
* `yarn install`

src/markdown/tutorial/part-1/01-orientation.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,19 @@ We'll learn about the purposes of these files and folders as we go. For now, jus
233233
234234
## Starting and Stopping the Development Server
235235
236-
Ember CLI comes with a lot of different commands for a variety of development tasks, such as the `ember new` command that we saw earlier. It also comes with a *development server*, which we can launch with the `ember serve` command:
236+
Ember CLI comes with a lot of different commands for a variety of development tasks, such as the `ember new` command that we saw earlier. It also comes with a *development server*, which we can launch within the project with the `npm start` command:
237237
238238
```run:server:start cwd=super-rentals expect="Serving on http://localhost:4200/"
239239
#[cfg(all(ci, unix))]
240-
#[display(ember serve)]
241-
ember serve | awk '{ \
240+
#[display(npm start)]
241+
npm start | awk '{ \
242242
gsub("Build successful \\([0-9]+ms\\)", "Build successful (9761ms)"); \
243243
print; \
244244
system("") # https://unix.stackexchange.com/a/83853 \
245245
}'
246246
247247
#[cfg(not(all(ci, unix)))]
248-
ember serve
248+
npm start
249249
```
250250
251251
The development server is responsible for compiling our app and serving it to the browsers. It may take a while to boot up. Once it's up and running, open your favorite browser and head to <http://localhost:4200>. You should see the following welcome page:
@@ -258,7 +258,7 @@ visit http://localhost:4200/?deterministic
258258
>
259259
> The `localhost` address in the URL means that you can only access the development server from your local machine. If you would like to share your work with the world, you will have to *[deploy](https://cli.emberjs.com/release/basic-use/deploying/)* your app to the public Internet. We'll cover how to do that in Part 2 of the tutorial.
260260
261-
You can exit out of the development server at any time by typing `Ctrl + C` into the terminal window where `ember serve` is running. That is, typing the "C" key on your keyboard *while* holding down the "Ctrl" key at the same time. Once it has stopped, you can start it back up again with the same `ember server` command. We recommend having two terminal windows open: one to run the server in background, another to type other Ember CLI commands.
261+
You can exit out of the development server at any time by typing `Ctrl + C` into the terminal window where `npm start` is running. That is, typing the "C" key on your keyboard *while* holding down the "Ctrl" key at the same time. Once it has stopped, you can start it back up again with the same `npm start` command. We recommend having two terminal windows open: one to run the server in background, another to type other Ember CLI commands.
262262
263263
## Editing Files and Live Reload
264264
@@ -402,7 +402,7 @@ visit http://localhost:4200/?deterministic
402402
```
403403

404404
```run:server:stop
405-
ember serve
405+
npm start
406406
```
407407

408408
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-1/02-building-pages.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
In this chapter, you will build the first few pages of your Ember app and set up links between them. By the end of this chapter, you should have two new pages – an about page and a contact page. These pages will be linked to from your landing page:
@@ -192,7 +192,7 @@ We will learn more about how all of this works soon. In the meantime, go ahead a
192192
Congratulations, you are well on your way to becoming a master page-crafter!
193193

194194
```run:server:stop
195-
ember serve
195+
npm start
196196
```
197197

198198
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-1/03-automated-testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
In this chapter, you will use Ember's built-in testing framework to write some automated tests for your app. By the end of this chapter, we will have an automated test suite that we can run to ensure our app is working correctly:
@@ -192,7 +192,7 @@ For the rest of the tutorial, we will continue to add more automated tests as we
192192
If you are in a hurry, you can skip over the testing sections in this tutorial and still be able to follow along with everything else. But don't you find it super satisfying&mdash;*oddly satisfying*&mdash;to watch a robot click on things really, really fast?
193193

194194
```run:server:stop
195-
ember serve
195+
npm start
196196
```
197197

198198
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-1/04-component-basics.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
In this chapter, you will *[refactor](../../../components/introducing-components/#toc_breaking-it-into-pieces)* your existing templates to use components. We will also be adding a site-wide navigation bar:
@@ -372,7 +372,7 @@ wait #qunit-banner.qunit-pass
372372
```
373373

374374
```run:server:stop
375-
ember serve
375+
npm start
376376
```
377377

378378
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-1/05-more-about-components.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
It's time to finally work on the rentals listing:
@@ -249,7 +249,7 @@ wait #qunit-banner.qunit-pass
249249
```
250250
251251
```run:server:stop
252-
ember serve
252+
npm start
253253
```
254254
255255
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-1/06-interactive-components.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
In this chapter, you will add interactivity to the page, allowing the user to click an image to enlarge or shrink it:
@@ -341,7 +341,7 @@ wait #qunit-banner.qunit-pass
341341
```
342342

343343
```run:server:stop
344-
ember serve
344+
npm start
345345
```
346346

347347
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-1/07-reusable-components.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ After saving the changes to our configuration file, we will need to restart our
6060

6161
<!-- TODO: https://github.com/ember-cli/ember-cli/issues/8782 -->
6262

63-
You can stop the server by finding the terminal window where `ember serve` is running, then type `Ctrl + C`. That is, typing the "C" key on your keyboard *while* holding down the "Ctrl" key at the same time. Once it has stopped, you can start it back up again with the same `ember server` command.
63+
You can stop the server by finding the terminal window where `npm start` is running, then type `Ctrl + C`. That is, typing the "C" key on your keyboard *while* holding down the "Ctrl" key at the same time. Once it has stopped, you can start it back up again with the same `npm start` command.
6464

6565
```run:server:start cwd=super-rentals expect="Serving on http://localhost:4200/"
6666
#[cfg(all(ci, unix))]
67-
#[display(ember serve)]
68-
ember serve | awk '{ \
67+
#[display(npm start)]
68+
npm start | awk '{ \
6969
gsub("Build successful \\([0-9]+ms\\)", "Build successful (13286ms)"); \
7070
print; \
7171
system("") # https://unix.stackexchange.com/a/83853 \
7272
}'
7373
7474
#[cfg(not(all(ci, unix)))]
75-
ember serve
75+
npm start
7676
```
7777

7878
## Generating a Component with a Component Class
@@ -465,7 +465,7 @@ wait #qunit-banner.qunit-pass
465465
```
466466
467467
```run:server:stop
468-
ember serve
468+
npm start
469469
```
470470
471471
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-1/08-working-with-data.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
In this chapter, we will remove the hard-coded data from our `<Rental>` component. By the end, your app would finally be displaying real data that came from the server:
@@ -387,7 +387,7 @@ wait #qunit-banner.qunit-pass
387387
```
388388

389389
```run:server:stop
390-
ember serve
390+
npm start
391391
```
392392

393393
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-2/09-route-params.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
Now that we are fetching real data from our "server", let's add a new feature — dedicated pages for each of our rentals:
@@ -374,7 +374,7 @@ wait #qunit-banner.qunit-pass
374374
This page *looks* done, but we have a share button that doesn't actually work. We'll address this in the next chapter.
375375

376376
```run:server:stop
377-
ember serve
377+
npm start
378378
```
379379

380380
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-2/10-service-injection.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
As promised, we will now work on implementing the share button!
@@ -417,7 +417,7 @@ wait #qunit-banner.qunit-pass
417417
```
418418
419419
```run:server:stop
420-
ember serve
420+
npm start
421421
```
422422
423423
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-2/11-ember-data.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
In this chapter, we will work on removing some code duplication in our route handlers, by switching to using EmberData to manage our data. The end result looks exactly the same as before:
@@ -327,7 +327,7 @@ wait .rental.detailed
327327
EmberData offers many, many features (like managing the *relationships* between different models) and there's a lot more we can learn about it. For example, if your backend's have some inconsistencies across different endpoints, EmberData allows you to define more specific, per-model adapters and serializers too! We are just scratching the surface here. If you want to learn more about EmberData, check out [its own dedicated section](../../../models/) in the guides!
328328
329329
```run:server:stop
330-
ember serve
330+
npm start
331331
```
332332
333333
```run:checkpoint cwd=super-rentals

src/markdown/tutorial/part-2/12-provider-components.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--lint disable no-undefined-references-->
22

33
```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/"
4-
ember serve
4+
npm start
55
```
66

77
In this chapter, we'll work on adding a new search feature, and refactor our `index.hbs` template into a new component along the way. We'll learn about a new pattern for passing data around between components, too! Once we're done, our page will look like this:
@@ -391,7 +391,7 @@ wait #qunit-banner.qunit-pass
391391
```
392392

393393
```run:server:stop
394-
ember serve
394+
npm start
395395
```
396396

397397
```run:checkpoint cwd=super-rentals

0 commit comments

Comments
 (0)