Skip to content

Commit 271cb8d

Browse files
authored
Merge pull request #2161 from ember-learn/tutorial-vite
add new tutorial output
2 parents 4c9068c + 86ce08e commit 271cb8d

File tree

70 files changed

+139
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+139
-113
lines changed

.local.dic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ linters
130130
lookups
131131
LSP
132132
Mapbox
133+
TomTom
133134
MDN
134135
metaprogramming
135136
misspelt

guides/release/tutorial/part-1/automated-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Finally, we asserted that clicking on the link should bring us to the `/about` U
115115
</div>
116116
</div>
117117

118-
We can put our automated test into motion by running the _test server_ using the `ember test --server` command, or `ember t -s` for short. This server behaves much like the development server, but it is explicitly running for our tests. It may automatically open a browser window and take you to the test UI, or you can open `http://localhost:7357/` yourself.
118+
We can put our automated test into motion by running the development server using the `npm start` command and navigating to `http://localhost:4200/tests` in your browser.
119119

120120
If you watch really carefully, you can see our test robot roaming around our app and clicking links:
121121

guides/release/tutorial/part-1/building-pages.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This time, we would like the page to be served on the `/about` URL. In order to
2525
The place to manage what pages are available is the _router_. Go ahead and open `app/router.js` and make the following change:
2626

2727
```js { data-filename="app/router.js" data-diff="-9,+10,+11,+12" }
28-
import EmberRouter from '@ember/routing/router';
28+
import EmberRouter from '@embroider/router';
2929
import config from 'super-rentals/config/environment';
3030

3131
export default class Router extends EmberRouter {
@@ -72,7 +72,7 @@ We're on a roll! While we're at it, let's add our third page. This time, things
7272
We want to keep the existing URLs for the new website, but we don't want to have to type `getting-in-touch` all over the new codebase! Fortunately, we can have the best of both worlds:
7373

7474
```js { data-filename="app/router.js" data-diff="+11" }
75-
import EmberRouter from '@ember/routing/router';
75+
import EmberRouter from '@embroider/router';
7676
import config from 'super-rentals/config/environment';
7777

7878
export default class Router extends EmberRouter {

guides/release/tutorial/part-1/orientation.md

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To verify that your installation was successful, run:
2424

2525
```shell
2626
$ ember --version
27-
ember-cli: 6.7.0
27+
ember-cli: 6.8.0
2828
node: 18.20.8
2929
os: linux x64
3030
```
@@ -37,27 +37,27 @@ We can create a new project using Ember CLI's `new` command. It follows the patt
3737

3838
```shell
3939
$ ember new super-rentals --lang en --strict
40-
installing classic-build-app-blueprint
41-
@ember-tooling/classic-build-app-blueprint v6.7.0
42-
40+
installing app-blueprint
4341
Creating a new Ember app in /home/runner/work/super-rentals-tutorial/super-rentals-tutorial/dist/code/super-rentals:
4442
create .editorconfig
4543
create .ember-cli
44+
create .env.development
4645
create .github/workflows/ci.yml
4746
create .prettierignore
48-
create .prettierrc.js
47+
create .prettierrc.mjs
4948
create .stylelintignore
50-
create .stylelintrc.js
51-
create .template-lintrc.js
49+
create .stylelintrc.cjs
50+
create .template-lintrc.mjs
5251
create .watchmanconfig
5352
create README.md
53+
create /home/runner/work/super-rentals-tutorial/super-rentals-tutorial/dist/code/super-rentals/babel.config.cjs
5454
create /home/runner/work/super-rentals-tutorial/super-rentals-tutorial/dist/code/super-rentals/eslint.config.mjs
5555
create app/app.js
5656
create app/components/.gitkeep
57+
create app/config/environment.js
5758
create app/controllers/.gitkeep
5859
create app/deprecation-workflow.js
5960
create app/helpers/.gitkeep
60-
create app/index.html
6161
create app/models/.gitkeep
6262
create app/router.js
6363
create app/routes/.gitkeep
@@ -69,14 +69,16 @@ Creating a new Ember app in /home/runner/work/super-rentals-tutorial/super-renta
6969
create config/targets.js
7070
create ember-cli-build.js
7171
create .gitignore
72+
create index.html
7273
create package.json
7374
create public/robots.txt
74-
create testem.js
75+
create testem.cjs
7576
create tests/helpers/index.js
7677
create tests/index.html
7778
create tests/integration/.gitkeep
7879
create tests/test-helper.js
7980
create tests/unit/.gitkeep
81+
create vite.config.mjs
8082

8183
Installing packages... This might take a couple of minutes.
8284
npm: Installing dependencies ...
@@ -110,6 +112,8 @@ super-rentals
110112
├── app
111113
│ ├── components
112114
│ │ └── .gitkeep
115+
│ ├── config
116+
│ │ └── environment.js
113117
│ ├── controllers
114118
│ │ └── .gitkeep
115119
│ ├── helpers
@@ -124,7 +128,6 @@ super-rentals
124128
│ │ └── application.gjs
125129
│ ├── app.js
126130
│ ├── deprecation-workflow.js
127-
│ ├── index.html
128131
│ └── router.js
129132
├── config
130133
│ ├── ember-cli-update.json
@@ -144,22 +147,25 @@ super-rentals
144147
│ └── test-helper.js
145148
├── .editorconfig
146149
├── .ember-cli
147-
├── .eslintcache
150+
├── .env.development
148151
├── .gitignore
149152
├── .prettierignore
150-
├── .prettierrc.js
153+
├── .prettierrc.mjs
151154
├── .stylelintignore
152-
├── .stylelintrc.js
153-
├── .template-lintrc.js
155+
├── .stylelintrc.cjs
156+
├── .template-lintrc.mjs
154157
├── .watchmanconfig
155158
├── README.md
159+
├── babel.config.cjs
156160
├── ember-cli-build.js
157161
├── eslint.config.mjs
162+
├── index.html
158163
├── package.json
159164
├── package-lock.json
160-
└── testem.js
165+
├── testem.cjs
166+
└── vite.config.mjs
161167
162-
17 directories, 37 files
168+
27 directories, 56 files
163169
```
164170

165171
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.
@@ -172,11 +178,26 @@ Ember CLI comes with a lot of different commands for a variety of development ta
172178
$ npm start
173179

174180
175-
> ember serve
181+
> vite
182+
183+
Building
184+
185+
Environment: development
176186

177187
building...
178188

179-
Build successful (9761ms) – Serving on http://localhost:4200/
189+
190+
Build successful (9761ms)
191+
192+
Slowest Nodes (totalTime >= 5%) | Total (avg)
193+
-+-
194+
Babel: @embroider/macros (1) | 436ms
195+
196+
197+
198+
VITE v6.3.6 ready in 4143 ms
199+
200+
➜ Local: http://localhost:4200/
180201
```
181202

182203
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 <http://localhost:4200>. You should see the following welcome page:
@@ -204,8 +225,8 @@ The development server has a feature called _live reload_, which monitors your a
204225
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:
205226

206227
```gjs { data-filename="app/templates/application.gjs" data-diff="-1,-2,-3,-5,-6,-7,-8,-9,-10,-11,+12" }
207-
import pageTitle from 'ember-page-title/helpers/page-title';
208-
import WelcomePage from 'ember-welcome-page/components/welcome-page';
228+
import { pageTitle } from 'ember-page-title';
229+
import { WelcomePage } from 'ember-welcome-page';
209230
210231
<template>
211232
{{pageTitle "SuperRentals"}}

0 commit comments

Comments
 (0)