ember-learn / cli-guides

Step-by-step guides and tutorials for using the ember-cli to create apps and addons
https://cli.emberjs.com
MIT License
25 stars 76 forks source link

Document app re-export #203

Open mehulkar opened 4 years ago

mehulkar commented 4 years ago

Document why addons re-export everything from addon/ into app/.

jenweber commented 3 years ago

If anyone wants to pick up this ticket, here are some suggestions!

This content can be added here: https://cli.emberjs.com/release/writing-addons/#addon

There is a minimal explanation there, but it could be improved. My understanding is that the main reason things are re-exported in app is because the app files in the addon are merged with the app files of the app. This allows Ember devs to use things like addon components using the exact same syntax and patterns they would use if the component existed directly in their own app.

Many times, addon authors have additional files in the addon folder that they do not re-export as public API, so it's good to have the distinction.