Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions guides/release/tutorial/part-1/orientation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -122,6 +123,8 @@ super-rentals
│ │ └── .gitkeep
│ ├── routes
│ │ └── .gitkeep
│ ├── services
│ │ └── .gitkeep
│ ├── styles
│ │ └── app.css
│ ├── templates
Expand All @@ -134,6 +137,29 @@ super-rentals
│ ├── environment.js
│ ├── optional-features.json
│ └── targets.js
├── dist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to figure out why dist and tmp are showing up in this diff 🤔

│ ├── @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
Expand All @@ -145,6 +171,9 @@ super-rentals
│ │ └── .gitkeep
│ ├── index.html
│ └── test-helper.js
├── tmp
│ └── compat-prebuild
│ └── .stage2-output
├── .editorconfig
├── .ember-cli
├── .env.development
Expand All @@ -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.
Expand All @@ -191,11 +220,11 @@ Build successful (9761ms)

Slowest Nodes (totalTime >= 5%) | Total (avg)
-+-
Babel: @embroider/macros (1) | 436ms
Babel: @embroider/macros (1) | 395ms



VITE v6.3.6 ready in 4143 ms
VITE v7.2.0 ready in 3824 ms

➜ Local: http://localhost:4200/
```
Expand Down
4 changes: 2 additions & 2 deletions guides/release/tutorial/part-1/reusable-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ Build successful (13286ms)

Slowest Nodes (totalTime >= 5%) | Total (avg)
-+-
Babel: @embroider/macros (1) | 423ms
Babel: @embroider/macros (1) | 387ms



VITE v6.3.6 ready in 4119 ms
VITE v7.2.0 ready in 3767 ms

➜ Local: http://localhost:4200/
```
Expand Down
2 changes: 1 addition & 1 deletion guides/release/tutorial/part-1/working-with-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<Rental>` 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 `<Rental>` 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.

Expand Down
14 changes: 8 additions & 6 deletions guides/release/tutorial/part-2/ember-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions guides/release/tutorial/part-2/provider-components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Heads up! This is a generated file, do not edit directly. You can find the source at https://github.com/ember-learn/super-rentals-tutorial/blob/master/src/markdown/tutorial/part-2/12-provider-components.md -->

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:

<!-- TODO: make this a gif instead -->

Expand Down Expand Up @@ -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!

Expand Down