diff --git a/guides/release/tutorial/part-1/orientation.md b/guides/release/tutorial/part-1/orientation.md index 38d57f455f..decb1af547 100644 --- a/guides/release/tutorial/part-1/orientation.md +++ b/guides/release/tutorial/part-1/orientation.md @@ -25,7 +25,7 @@ To verify that your installation was successful, run: ```shell $ ember --version ember-cli: 6.8.0 -node: 18.20.8 +node: 20.19.5 os: linux x64 ``` @@ -61,6 +61,7 @@ Creating a new Ember app in /home/runner/work/super-rentals-tutorial/super-renta create app/models/.gitkeep create app/router.js create app/routes/.gitkeep + create app/services/.gitkeep create app/styles/app.css create /home/runner/work/super-rentals-tutorial/super-rentals-tutorial/dist/code/super-rentals/app/templates/application.gjs create config/ember-cli-update.json @@ -122,6 +123,8 @@ super-rentals │ │ └── .gitkeep │ ├── routes │ │ └── .gitkeep +│ ├── services +│ │ └── .gitkeep │ ├── styles │ │ └── app.css │ ├── templates @@ -134,6 +137,29 @@ super-rentals │ ├── environment.js │ ├── optional-features.json │ └── targets.js +├── dist +│ ├── @embroider +│ │ └── virtual +│ │ ├── app.css +│ │ ├── test-support.css +│ │ ├── test-support.js +│ │ ├── vendor.css +│ │ └── vendor.js +│ ├── assets +│ │ ├── app-BOleBDkl.js +│ │ ├── app-BsLReVUA.css +│ │ ├── main-B23G6Kgj.js +│ │ ├── modules-4-12-CusihsH3.js +│ │ ├── tests-C-PRrhBK.js +│ │ └── tests-CZyZLpGa.css +│ ├── ember-welcome-page +│ │ └── images +│ │ └── construction.png +│ ├── tests +│ │ └── index.html +│ ├── index.html +│ ├── robots.txt +│ └── testem.js ├── public │ └── robots.txt ├── tests @@ -145,6 +171,9 @@ super-rentals │ │ └── .gitkeep │ ├── index.html │ └── test-helper.js +├── tmp +│ └── compat-prebuild +│ └── .stage2-output ├── .editorconfig ├── .ember-cli ├── .env.development @@ -165,7 +194,7 @@ super-rentals ├── testem.cjs └── vite.config.mjs -27 directories, 56 files +28 directories, 58 files ``` We'll learn about the purposes of these files and folders as we go. For now, just know that we'll spend most of our time working within the `app` folder. @@ -191,11 +220,11 @@ Build successful (9761ms) Slowest Nodes (totalTime >= 5%) | Total (avg) -+- -Babel: @embroider/macros (1) | 436ms +Babel: @embroider/macros (1) | 399ms - VITE v6.3.6 ready in 4143 ms + VITE v7.2.1 ready in 3820 ms ➜ Local: http://localhost:4200/ ``` diff --git a/guides/release/tutorial/part-1/reusable-components.md b/guides/release/tutorial/part-1/reusable-components.md index d36e09f57b..b1b8186778 100644 --- a/guides/release/tutorial/part-1/reusable-components.md +++ b/guides/release/tutorial/part-1/reusable-components.md @@ -101,11 +101,11 @@ Build successful (13286ms) Slowest Nodes (totalTime >= 5%) | Total (avg) -+- -Babel: @embroider/macros (1) | 423ms +Babel: @embroider/macros (1) | 409ms - VITE v6.3.6 ready in 4119 ms + VITE v7.2.1 ready in 3909 ms ➜ Local: http://localhost:4200/ ``` diff --git a/guides/release/tutorial/part-1/working-with-data.md b/guides/release/tutorial/part-1/working-with-data.md index c556af96a7..bfc9c4772d 100644 --- a/guides/release/tutorial/part-1/working-with-data.md +++ b/guides/release/tutorial/part-1/working-with-data.md @@ -418,7 +418,7 @@ Awesome! Now we're in business. ## Loops and Local Variables in Templates with `{{#each}}` -The last change we'll need to make is to our `index.hbs` route template, where we invoke our `` components. Previously, we were passing in `@rental` as `@model` to our components. However, `@model` is no longer a single object, but rather, an array! So, we'll need to change this template to account for that. +The last change we'll need to make is to our `index.gjs` route template, where we invoke our `` components. Previously, we were passing in `@rental` as `@model` to our components. However, `@model` is no longer a single object, but rather, an array! So, we'll need to change this template to account for that. Let's see how. diff --git a/guides/release/tutorial/part-2/ember-data.md b/guides/release/tutorial/part-2/ember-data.md index 5de3f7dcbe..a0557f4966 100644 --- a/guides/release/tutorial/part-2/ember-data.md +++ b/guides/release/tutorial/part-2/ember-data.md @@ -334,18 +334,14 @@ Let's start customizing the things that didn't work for us by default. Specifica The first thing we want to do is have our builder respect a configurable default host and/or namespace. Adding a namespace prefix happens to be pretty common across Ember apps, so EmberData provides a global config mechanism for host and namespace. Typically you will want to do this either in your store file or app file. -```js { data-filename="app/app.js" data-diff="+7,+8,+9,+10,+11" } +```js { data-filename="app/app.js" data-diff="+21,+22,+23,+24,+25" } import Application from '@ember/application'; import compatModules from '@embroider/virtual/compat-modules'; import Resolver from 'ember-resolver'; import loadInitializers from 'ember-load-initializers'; import config from 'super-rentals/config/environment'; import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros'; -import { setBuildURLConfig } from '@ember-data/request-utils'; - -setBuildURLConfig({ - namespace: 'api', -}); +import setupInspector from '@embroider/legacy-inspector-support/ember-source-4.12'; if (macroCondition(isDevelopingApp())) { importSync('./deprecation-workflow'); @@ -355,9 +351,15 @@ export default class App extends Application { modulePrefix = config.modulePrefix; podModulePrefix = config.podModulePrefix; Resolver = Resolver.withModules(compatModules); + inspector = setupInspector(this); } loadInitializers(App, config.modulePrefix, compatModules); +import { setBuildURLConfig } from '@ember-data/request-utils'; + +setBuildURLConfig({ + namespace: 'api', +}); ``` Adding the `.json` extension is a bit less common, and doesn't have a declarative configuration API of its own. We could just modify request options directly in place of use, but that would be a bit messy. Instead, let's create a handler to do this for us. diff --git a/guides/release/tutorial/part-2/provider-components.md b/guides/release/tutorial/part-2/provider-components.md index a0d816bdda..88ad2960b9 100644 --- a/guides/release/tutorial/part-2/provider-components.md +++ b/guides/release/tutorial/part-2/provider-components.md @@ -1,6 +1,6 @@ -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: +In this chapter, we'll work on adding a new search feature, and refactor our `index.gjs` 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: @@ -58,7 +58,7 @@ Awesome, one step done. Now, this input looks great, but it doesn't actually _do In order to make our search box actually work, we are going to need to retain and store the text that the user types in when they use the search box. This text is the search query, and it is a piece of _[state](../../../components/component-state-and-actions/)_ that is going to change whenever the user types something into the search box. -But where are we going to put this newly-introduced piece of state? In order to wire up the search box, we need a place to store the search query. At the moment, our search box lives on the `index.hbs` route template, which doesn't have a good place to store this search query state. Darn, this would be so much easier to do if we had a component, because we could just store the state directly on the component! +But where are we going to put this newly-introduced piece of state? In order to wire up the search box, we need a place to store the search query. At the moment, our search box lives on the `index.gjs` route template, which doesn't have a good place to store this search query state. Darn, this would be so much easier to do if we had a component, because we could just store the state directly on the component! Wait...why don't we just refactor the search box into a component? Once we do that, this will all be a bit easier—hooray!