Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow components to be grouped together in a single subdirectory. #61

Merged

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jul 24, 2014

This allows for the following formats (as discussed in the core team F2F):

* `component:foo-bar`           -> `app/pods/components/foo-bar/component`
* `template:components/foo-bar` -> `app/pods/components/foo-bar/template`

Thanks to @machty for pointing out this omission.

This allows for the following formats (as discussed in the core team F2F):

```
* `component:foo-bar`           -> `app/pods/components/foo-bar/component`
* `template:components/foo-bar` -> `app/pods/components/foo-bar/template`
```
@stefanpenner
Copy link
Contributor

wasn't the idea each pod would be component based?

app/pods/foo-bar/{component.js,template}
app/pods/baz-bar/{component.js, template}

@rwjblue
Copy link
Member Author

rwjblue commented Jul 24, 2014

@stefanpenner - Yes, that works already. This change allows you to group the two things for components together, under the root component dir. Specifically, if you do not set a podModulePrefix you could get:

app/components/foo-bar/component.js
app/components/foo-bar/template.hbs

This was discussed during the F2F (@wycats mentioned that he thought this was already possible actually).

It is possible that I misunderstood. I am happy to change and/or kill this if I missed the point...

@stefanpenner
Copy link
Contributor

@rwjblue in your second example there is no pod directory but in the first there is, is this intended?

@machty
Copy link

machty commented Jul 24, 2014

LGTM

stefanpenner added a commit that referenced this pull request Jul 24, 2014
Allow components to be grouped together in a single subdirectory.
@stefanpenner stefanpenner merged commit 42f539c into ember-cli:master Jul 24, 2014
@rwjblue
Copy link
Member Author

rwjblue commented Jul 24, 2014

@stefanpenner - Yeah, the idea is that you may or may not have a podModulePrefix if you do, then it would add it, but if not it just starts at the root.

@vsymguysung
Copy link

My ember-cli(v0.1.4) project is using the podModulePrefix and trying to use the ember-cli-jquery-ui addon that doesn't use the podModulePrefixbut follows the component PODs structure like below.

app/components/jqui-accordian/component.js
app/components/jqui-accordian/template.hbs

It seems that my project doesn't get components from the addon.I got the error saying "Handlebars error: Could not find property jqui-progress-bar on object"

Any Idea?
Thanks in advance.

kratiahuja pushed a commit to kratiahuja/ember-resolver that referenced this pull request Aug 5, 2016
Add automatic fallback to `${module}/index`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants