Skip to content

Commit

Permalink
add import guide for components, helpers, modifiers in external apps/…
Browse files Browse the repository at this point in the history
…addons
  • Loading branch information
Parrryy committed Feb 2, 2024
1 parent 83d707d commit 3953f8b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,31 @@ helpers, modifiers and components are available for import:
[rfc-496]: https://github.com/emberjs/rfcs/pull/496
## Reference: import external helpers, modifiers, components
You can import non `.gjs/.gts` helpers, modifiers and components from apps/addons
you may already be using when migrating your own components. To determine
the import path:
1. Check the app
1. If found, import that
2. If not found,
1. Check all addon's app folders
1. When found, look in the matching file to see what the re-export is -- this is what you can use in your app
2. Check all v2-addon's ember-addon#app-js configs in package.json
1. When found, look in the matching file to see what the re-export is -- this is what you can use in
For example:
```js
import BasicDropdown from 'ember-basic-dropdown/components/basic-dropdown';

<template>
<BasicDropdown>
<!-- Your component implementation here -->
</BasicDropdown>
</template>
```
## History
Expand Down

0 comments on commit 3953f8b

Please sign in to comment.