diff --git a/src/markdown/tutorial/part-1/01-orientation.md b/src/markdown/tutorial/part-1/01-orientation.md index ed08a73..11493c4 100644 --- a/src/markdown/tutorial/part-1/01-orientation.md +++ b/src/markdown/tutorial/part-1/01-orientation.md @@ -46,12 +46,12 @@ Hack: make an empty package.json to convince ember-cli we are really not in an E # pretend we are running NPM. #[cfg(all(ci, unix))] -#[display(ember new super-rentals --lang en --strict)] -ember new super-rentals --lang en --strict --pnpm \ +#[display(ember new super-rentals --lang en)] +ember new super-rentals --lang en --pnpm \ | awk '{ gsub("Pnpm", "npm"); gsub("pnpm", "npm"); print }' #[cfg(not(all(ci, unix)))] -ember new super-rentals --lang en --strict --pnpm +ember new super-rentals --lang en --pnpm ``` ```run:command hidden=true @@ -196,7 +196,7 @@ del package.json ```run:file:patch hidden=true cwd=super-rentals filename=.prettierignore @@ -1 +1,2 @@ -+**/*.gjs ++**/*.hbs # unconventional js ``` @@ -277,24 +277,20 @@ You can exit out of the development server at any time by typing `Ctrl + C` into The development server has a feature called *live reload*, which monitors your app for file changes, automatically re-compiles everything, and refreshes any open browser pages. This comes in really handy during development, so let's give that a try! -As text on the welcome page pointed out, the source code for the page is located in `app/templates/application.gjs`. Let's try to edit that file and replace it with our own content: +As text on the welcome page pointed out, the source code for the page is located in `app/templates/application.hbs`. Let's try to edit that file and replace it with our own content: -```run:file:patch lang=gjs cwd=super-rentals filename=app/templates/application.gjs -@@ -1,12 +1,3 @@ --import pageTitle from 'ember-page-title/helpers/page-title'; --import WelcomePage from 'ember-welcome-page/components/welcome-page'; +```run:file:patch lang=handlebars cwd=super-rentals filename=app/templates/application.hbs +@@ -1,7 +1 @@ +-{{page-title "SuperRentals"}} - - - ``` +-{{! The following component displays Ember's default welcome message. }} +- +-{{! Feel free to remove this! }} +\ No newline at end of file ++Hello World!!! +``` Soon after saving the file, your browser should automatically refresh and render our greetings to the world. Neat! @@ -302,29 +298,27 @@ Soon after saving the file, your browser should automatically refresh and render visit http://localhost:4200/?deterministic ``` -When you are done experimenting, go ahead and delete the `app/templates/application.gjs` file. We won't be needing this for a while, so let's start afresh. We can add it back later when we have a need for it. +When you are done experimenting, go ahead and delete the `app/templates/application.hbs` file. We won't be needing this for a while, so let's start afresh. We can add it back later when we have a need for it. ```run:command hidden=true cwd=super-rentals -git rm -f app/templates/application.gjs +git rm -f app/templates/application.hbs ``` Again, if you still have your browser tab open, your tab will automatically re-render a blank page as soon as you delete the file. This reflects the fact that we no longer have an application template in our app. ## Working with HTML, CSS and Assets in an Ember App -Create a `app/templates/index.gjs` file and paste the following markup. +Create a `app/templates/index.hbs` file and paste the following markup. -```run:file:create lang=gjs cwd=super-rentals filename=app/templates/index.gjs - +```run:file:create lang=handlebars cwd=super-rentals filename=app/templates/index.hbs +
+
+

Welcome to Super Rentals!

+

We hope you find exactly what you're looking for in a place to stay.

+
``` -If you are thinking, "Hey, that looks like HTML!", then you would be right! In their simplest form, Ember templates are really just HTML wrapped in a `