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
│ ├── @embroider
│ │ └── virtual
│ │ ├── app.css
│ │ ├── test-support.css
│ │ ├── test-support.js
│ │ ├── vendor.css
│ │ └── vendor.js
│ ├── assets
│ │ ├── app-BsLReVUA.css
│ │ ├── app-pzWalck4.js
│ │ ├── main-CdDm1GLL.js
│ │ ├── modules-4-12-DZBwh_jw.js
│ │ ├── tests-DuyDhxzu.css
│ │ └── tests-dtaPar7N.js
│ ├── 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) | 404ms



VITE v6.3.6 ready in 4143 ms
VITE v7.1.11 ready in 3870 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) | 415ms



VITE v6.3.6 ready in 4119 ms
VITE v7.1.11 ready in 3839 ms

➜ Local: http://localhost:4200/
```
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