diff --git a/README.md b/README.md index 1296c76..f76aee4 100644 --- a/README.md +++ b/README.md @@ -497,13 +497,13 @@ Start a server (background task). Example: ```run:server:start cwd=super-rentals expect="Serving on http://localhost:4200/" - ember server + npm start ``` Result: ```shell - $ ember server + $ npm start Build successful (9006ms) – Serving on http://localhost:4200/ ``` @@ -574,7 +574,7 @@ Stop a server (background task) previously started with `run:server:start`. Example: ```run:server:stop - ember server + npm start ``` The content of the source code block is the command used to start the server. @@ -589,7 +589,7 @@ Options: ## How? -* Requires [Volta](https://volta.sh), `git` +* Requires `git` * Probably only works on Unix/bash for now (PRs welcome) * Should probably run the build in a docker container anyway * `yarn install` diff --git a/src/markdown/tutorial/part-1/01-orientation.md b/src/markdown/tutorial/part-1/01-orientation.md index cca7a8c..23a4c09 100644 --- a/src/markdown/tutorial/part-1/01-orientation.md +++ b/src/markdown/tutorial/part-1/01-orientation.md @@ -233,19 +233,19 @@ We'll learn about the purposes of these files and folders as we go. For now, jus ## Starting and Stopping the Development Server -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: +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: ```run:server:start cwd=super-rentals expect="Serving on http://localhost:4200/" #[cfg(all(ci, unix))] -#[display(ember serve)] -ember serve | awk '{ \ +#[display(npm start)] +npm start | awk '{ \ gsub("Build successful \\([0-9]+ms\\)", "Build successful (9761ms)"); \ print; \ system("") # https://unix.stackexchange.com/a/83853 \ }' #[cfg(not(all(ci, unix)))] -ember serve +npm start ``` 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 . You should see the following welcome page: @@ -258,7 +258,7 @@ visit http://localhost:4200/?deterministic > > 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. -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. +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. ## Editing Files and Live Reload @@ -402,7 +402,7 @@ visit http://localhost:4200/?deterministic ``` ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-1/02-building-pages.md b/src/markdown/tutorial/part-1/02-building-pages.md index a07af67..cd5d8cb 100644 --- a/src/markdown/tutorial/part-1/02-building-pages.md +++ b/src/markdown/tutorial/part-1/02-building-pages.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` 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 Congratulations, you are well on your way to becoming a master page-crafter! ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-1/03-automated-testing.md b/src/markdown/tutorial/part-1/03-automated-testing.md index 6918ada..efde175 100644 --- a/src/markdown/tutorial/part-1/03-automated-testing.md +++ b/src/markdown/tutorial/part-1/03-automated-testing.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` 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 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—*oddly satisfying*—to watch a robot click on things really, really fast? ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-1/04-component-basics.md b/src/markdown/tutorial/part-1/04-component-basics.md index dcafa78..278afca 100644 --- a/src/markdown/tutorial/part-1/04-component-basics.md +++ b/src/markdown/tutorial/part-1/04-component-basics.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` 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 ``` ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-1/05-more-about-components.md b/src/markdown/tutorial/part-1/05-more-about-components.md index fc771dc..c1b4678 100644 --- a/src/markdown/tutorial/part-1/05-more-about-components.md +++ b/src/markdown/tutorial/part-1/05-more-about-components.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` It's time to finally work on the rentals listing: @@ -249,7 +249,7 @@ wait #qunit-banner.qunit-pass ``` ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-1/06-interactive-components.md b/src/markdown/tutorial/part-1/06-interactive-components.md index cf4ba97..bf63e23 100644 --- a/src/markdown/tutorial/part-1/06-interactive-components.md +++ b/src/markdown/tutorial/part-1/06-interactive-components.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` 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 ``` ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-1/07-reusable-components.md b/src/markdown/tutorial/part-1/07-reusable-components.md index 90d9eb3..5916595 100644 --- a/src/markdown/tutorial/part-1/07-reusable-components.md +++ b/src/markdown/tutorial/part-1/07-reusable-components.md @@ -60,19 +60,19 @@ After saving the changes to our configuration file, we will need to restart our -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. +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. ```run:server:start cwd=super-rentals expect="Serving on http://localhost:4200/" #[cfg(all(ci, unix))] -#[display(ember serve)] -ember serve | awk '{ \ +#[display(npm start)] +npm start | awk '{ \ gsub("Build successful \\([0-9]+ms\\)", "Build successful (13286ms)"); \ print; \ system("") # https://unix.stackexchange.com/a/83853 \ }' #[cfg(not(all(ci, unix)))] -ember serve +npm start ``` ## Generating a Component with a Component Class @@ -465,7 +465,7 @@ wait #qunit-banner.qunit-pass ``` ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-1/08-working-with-data.md b/src/markdown/tutorial/part-1/08-working-with-data.md index b36d5d1..403d719 100644 --- a/src/markdown/tutorial/part-1/08-working-with-data.md +++ b/src/markdown/tutorial/part-1/08-working-with-data.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` In this chapter, we will remove the hard-coded data from our `` 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 ``` ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-2/09-route-params.md b/src/markdown/tutorial/part-2/09-route-params.md index 1cc4f12..3f5e20e 100644 --- a/src/markdown/tutorial/part-2/09-route-params.md +++ b/src/markdown/tutorial/part-2/09-route-params.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` 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 This page *looks* done, but we have a share button that doesn't actually work. We'll address this in the next chapter. ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-2/10-service-injection.md b/src/markdown/tutorial/part-2/10-service-injection.md index 25144d7..83d8766 100644 --- a/src/markdown/tutorial/part-2/10-service-injection.md +++ b/src/markdown/tutorial/part-2/10-service-injection.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` As promised, we will now work on implementing the share button! @@ -417,7 +417,7 @@ wait #qunit-banner.qunit-pass ``` ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-2/11-ember-data.md b/src/markdown/tutorial/part-2/11-ember-data.md index 79997fb..c9b1f22 100644 --- a/src/markdown/tutorial/part-2/11-ember-data.md +++ b/src/markdown/tutorial/part-2/11-ember-data.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` 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 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! ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals diff --git a/src/markdown/tutorial/part-2/12-provider-components.md b/src/markdown/tutorial/part-2/12-provider-components.md index 757d9c8..1aae8d0 100644 --- a/src/markdown/tutorial/part-2/12-provider-components.md +++ b/src/markdown/tutorial/part-2/12-provider-components.md @@ -1,7 +1,7 @@ ```run:server:start hidden=true cwd=super-rentals expect="Serving on http://localhost:4200/" -ember serve +npm start ``` 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 ``` ```run:server:stop -ember serve +npm start ``` ```run:checkpoint cwd=super-rentals