Skip to content

Commit 55a2d5a

Browse files
committed
Changed import paths
- no extensions - no relative paths
1 parent 23453dd commit 55a2d5a

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

guides/release/in-depth-topics/autotracking-in-depth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default class HelloComponent extends Component {
3333
```
3434

3535
```gjs {data-filename=app/templates/application.gjs}
36-
import '../components/hello.gjs';
36+
import 'my-app/components/hello';
3737
3838
<template>
3939
<Hello @name="Jen Weber">
@@ -283,7 +283,7 @@ export default class Person {
283283

284284
```js {data-filename=app/routes/application.js}
285285
import Route from '@ember/routing/route';
286-
import Person from '../../../../utils/person';
286+
import Person from 'my-app/utils/person';
287287

288288
export default class ApplicationRoute extends Route {
289289
model() {

guides/release/in-depth-topics/patterns-for-actions.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ delete their profile:
165165

166166
```gjs {data-filename=app/components/user-profile.gjs}
167167
import Component from '@glimmer/component';
168-
import ButtonWithConfirmation from './button-with-confirmation.gjs';
168+
import ButtonWithConfirmation from 'my-app/components/button-with-confirmation';
169169
170170
export default class UserProfileComponent extends Component {
171171
<template>
@@ -188,7 +188,7 @@ that manages the user's login and information.
188188
```gjs {data-filename=app/components/user-profile.gjs}
189189
import Component from '@glimmer/component';
190190
import { service } from '@ember/service';
191-
import ButtonWithConfirmation from './button-with-confirmation.gjs';
191+
import ButtonWithConfirmation from 'my-app/components/button-with-confirmation';
192192
193193
export default class UserProfileComponent extends Component {
194194
@service login;
@@ -213,7 +213,7 @@ to it as an argument:
213213
```gjs {data-filename=app/components/user-profile.gjs}
214214
import Component from '@glimmer/component';
215215
import { service } from '@ember/service';
216-
import ButtonWithConfirmation from './button-with-confirmation.gjs';
216+
import ButtonWithConfirmation from 'my-app/components/button-with-confirmation';
217217
218218
export default class UserProfileComponent extends Component {
219219
@service login;
@@ -387,7 +387,7 @@ child. For example, if we want to use the button to send a message of type
387387
```gjs {data-filename=app/components/send-message.gjs}
388388
import Component from '@glimmer/component';
389389
import { fn } from '@ember/helper';
390-
import ButtonWithConfirmation from './button-with-confirmation.gjs';
390+
import ButtonWithConfirmation from 'my-app/components/button-with-confirmation';
391391
392392
export default class SendMessageComponent extends Component {
393393
sendMessage = async (messageType) => {
@@ -521,7 +521,7 @@ text input element whose `value` attribute is set to `confirmValue`:
521521

522522
```gjs {data-filename=app/components/send-message.gjs}
523523
import Component from '@glimmer/component';
524-
import ButtonWithConfirmation from './button-with-confirmation.gjs';
524+
import ButtonWithConfirmation from 'my-app/components/button-with-confirmation';
525525
import { Input } from '@ember/component';
526526
527527
export default class SendMessageComponent extends Component {
@@ -558,7 +558,7 @@ messaging service.
558558

559559
```gjs {data-filename=app/components/send-message.gjs}
560560
import Component from '@glimmer/component';
561-
import ButtonWithConfirmation from './button-with-confirmation.gjs';
561+
import ButtonWithConfirmation from 'my-app/components/button-with-confirmation';
562562
import { Input } from '@ember/component';
563563
import { service } from '@ember/service';
564564
@@ -643,7 +643,7 @@ only the user's account `id` string.
643643
```gjs {data-filename=app/components/system-preferences-editor.gjs}
644644
import Component from '@glimmer/component';
645645
import { fn } from '@ember/helper';
646-
import UserProfile from './user-profile.gjs';
646+
import UserProfile from 'my-app/components/user-profile';
647647
648648
export default class SystemPreferencesEditorComponent extends Component {
649649
// ...
@@ -679,7 +679,7 @@ the parent `system-preferences-editor.gjs` and pass the local `deleteUser` actio
679679
import Component from '@glimmer/component';
680680
import { service } from '@ember/service';
681681
import { fn } from '@ember/helper';
682-
import UserProfile from './user-profile.gjs';
682+
import UserProfile from 'my-app/components/user-profile';
683683
684684
export default class SystemPreferencesEditorComponent extends Component {
685685
@service login;
@@ -706,7 +706,7 @@ In our `UserProfile` component we change our action to call
706706
```gjs {data-filename=app/components/user-profile.gjs}
707707
import Component from '@glimmer/component';
708708
import { service } from '@ember/service';
709-
import ButtonWithConfirmation from './button-with-confirmation.gjs';
709+
import ButtonWithConfirmation from 'my-app/components/button-with-confirmation';
710710
711711
export default class UserProfileComponent extends Component {
712712
// ...

guides/release/in-depth-topics/patterns-for-components.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class TooltipComponent extends Component {
3737
Now when called like so:
3838

3939
```gjs
40-
import Tooltip from '../components/tooltip.gjs';
40+
import Tooltip from 'my-app/components/tooltip';
4141
4242
<template>
4343
<Tooltip @content="I'm a tooltip!"/>
@@ -128,7 +128,7 @@ The most frequently used of these is `aria-describedby` and `aria-labelledby`.
128128
In these cases, make sure to declare _all_ of the relevant values in the correct order.
129129

130130
```gjs
131-
import MyInput from '../components/my-input.gjs';
131+
import MyInput from 'my-app/components/my-input';
132132
133133
<template>
134134
<MyInput @input-label="Password" aria-describedby="text-help-0 text-help-1" />
@@ -161,8 +161,8 @@ displaying different kinds of posts. First, define your two components:
161161
Then, you can choose which to render based on the data:
162162

163163
```gjs {data-filename=app/templates/index.gjs}
164-
import RootPost from '../components/root-post.gjs';
165-
import ReplyPost from '../components/reply-post.gjs';
164+
import RootPost from 'my-app/components/root-post';
165+
import ReplyPost from 'my-app/components/reply-post';
166166
167167
// returns either RootPost or ReplyPost (default: RootPost)
168168
function getPostComponent(postType) {
@@ -182,8 +182,8 @@ function getPostComponent(postType) {
182182
This is great when `RootPost` and `ReplyPost` take the same arguments, like `author` and `body` in the above example. But what if the components accept different arguments? One way would be to move the selection conditional into the template, like so:
183183

184184
```gjs {data-filename=app/templates/index.gjs}
185-
import RootPost from '../components/root-post.gjs';
186-
import ReplyPost from '../components/reply-post.gjs';
185+
import RootPost from 'my-app/components/root-post';
186+
import ReplyPost from 'my-app/components/reply-post';
187187
188188
const eq = (a, b) => a === b;
189189
@@ -217,9 +217,9 @@ The first parameter of the helper is a component to render. So `{{component Blog
217217
The `component` helper is often used when yielding components to blocks. For example the layout for a SuperForm component might be implemented as:
218218

219219
```gjs {data-filename=app/components/super-form.gjs}
220-
import SuperInput from './super-input.gjs';
221-
import SuperTextarea from './super-input.gjs';
222-
import SuperSubmit from './super-input.gjs';
220+
import SuperInput from 'my-app/components/super-input';
221+
import SuperTextarea from 'my-app/components/super-textarea';
222+
import SuperSubmit from 'my-app/components/super-submit';
223223
224224
<template>
225225
<form>
@@ -235,7 +235,7 @@ import SuperSubmit from './super-input.gjs';
235235
And be used as:
236236

237237
```gjs {data-filename=app/templates/index.gjs}
238-
import SuperForm from '../components/super-form.gjs';
238+
import SuperForm from 'my-app/components/super-form';
239239
240240
<template>
241241
<SuperForm @model={{this.post}} as |f|>
@@ -253,12 +253,12 @@ The `{{component}}` helper is a powerful tool for improving code modularity.
253253
We can even use helpers and modifiers in the same way. Let's extend the SuperForm component:
254254

255255
```gjs {data-filename=app/components/super-form.gjs}
256-
import SuperInput from './super-input.gjs';
257-
import SuperTextarea from './super-input.gjs';
258-
import SuperSubmit from './super-input.gjs';
259-
import superIsValid from '../helpers/super-is-valid.js';
260-
import superErrorFor from '../helpers/super-error-for.js';
261-
import superAutoResize from '../modifiers/super-auto-resize.js';
256+
import SuperInput from 'my-app/components/super-input';
257+
import SuperTextarea from 'my-app/components/super-textarea';
258+
import SuperSubmit from 'my-app/components/super-submit';
259+
import superIsValid from 'my-app/helpers/super-is-valid';
260+
import superErrorFor from 'my-app/helpers/super-error-for';
261+
import superAutoResize from 'my-app/modifiers/super-auto-resize';
262262
263263
<template>
264264
<form>
@@ -281,7 +281,7 @@ import superAutoResize from '../modifiers/super-auto-resize.js';
281281
And be used as:
282282

283283
```gjs {data-filename=app/templates/index.gjs}
284-
import SuperForm from '../components/super-form.gjs';
284+
import SuperForm from 'my-app/components/super-form';
285285
286286
<template>
287287
<SuperForm @model={{this.post}} as |f|>

0 commit comments

Comments
 (0)