Generating components for in-repo addon uses partially incorrect path
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
When running `ember g component --ir shared test-component` the following files are generated:
```
installing component
identical ../shared/addon/pods/components/test-component/component.js
identical ../shared/addon/pods/components/test-component/template.hbs
[...]
installing component-addon
identical lib/shared/app/pods/components/test-component/component.js
```
`component` is using the correct path as specified in `package.json`
```
"ember-addon": {
"paths": [
"../shared"
]
}
```
however `component-addon` is using a hardcoded path in `component-addon/index.js` for the `__root__` key.
```
__root__: function(options) {
if (options.inRepoAddon) {
return path.join('lib', options.inRepoAddon, 'app');
}
return 'app';
},
```
Removing the `__root__` key from the template results in `../shared/addon/[...]` so not quite correct either.
If someone could point me in the right direction how to get to the correct path I'd be happy to create a PR.
Contributor guide
Assessment
This issue has not been assessed yet.