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

defaultType support, mv partials code to resolver #192

Merged
merged 1 commit into from
Jun 10, 2017

Conversation

mixonic
Copy link
Member

@mixonic mixonic commented Jun 10, 2017

  • Add defaultType to the Ember resolver config.
  • Use the defaultType in RequireJSRegistry to optionally check for the non-typed path.
  • Move the path conversion for partials into the Ember resolver and out of the module registry.

Closes: #189
Replaces: #183

with @iezer :-)

[ 'router:/my-app/main/main', 'my-app/src/router' ],
[ 'route:/my-app/routes/application', 'my-app/src/ui/routes/application/route' ],
[ 'template:/my-app/routes/application', 'my-app/src/ui/routes/application/template' ],
[ 'component:/my-app/components/my-input', 'my-app/src/ui/components/my-input/component' ],
[ 'template:/my-app/routes/components/my-input', 'my-app/src/ui/components/my-input/template' ],
[ 'template:/my-app/components/my-input', 'my-app/src/ui/components/my-input/template' ],
[ 'component:/my-app/components/my-input/my-button', 'my-app/src/ui/components/my-input/my-button/component' ],
[ 'template:/my-app/components/my-input/my-button', 'my-app/src/ui/components/my-input/my-button/template' ],
[ 'template:/my-app/routes/-author', 'my-app/src/ui/partials/author' ],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the other changes in this PR make partials still work, why remove the test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment about this in the source- I'd like to see this bulk test be simmered down into smaller focused tests with better descriptions of the intent. @iezer and I took the first steps toward some utilities to help keep those test terse.

},

/*
* templates may acutally be partial lookups, so consider them as possibly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/acutally/actually/

@mixonic mixonic merged commit d153cc8 into ember-cli:master Jun 10, 2017
@mixonic mixonic deleted the defaultType branch June 10, 2017 17:55
@@ -23,11 +25,36 @@ const Resolver = DefaultResolver.extend({
normalize: null,

resolve(lookupString) {
/*
* Ember paritals are looked up as templates. Here we replace the template
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

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.

GlimmerWrapper: Resolve modules without a default export
3 participants