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

Normalize referrer and lookupString, add config flag #198

Merged
merged 1 commit into from
Jul 2, 2017

Conversation

mixonic
Copy link
Member

@mixonic mixonic commented Jul 1, 2017

  • The referrer from Ember is not an absolute specifier. Do some string
    munging to clean it up. We would like this to be a build step
    on Ember template compilation at some point.
  • Ember tries to namespace components with components/ as a specifier
    namespace. Drop that, since MU rules say to look in the components
    collection anyway.
  • Add config to disable templates from being resolved locally in routes.

Supersedes #196, compatible with glimmerjs/glimmer-resolver#17

if (lookupString.indexOf('template:components/') === 0) {
if (referrer) {
// make absolute
let appName = this.config.app.rootName;
Copy link
Member Author

Choose a reason for hiding this comment

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

Should this be app.name or app.rootName?

if (lookupString.indexOf('template:components/') === 0) {
if (referrer) {
// make absolute
let appName = this.config.app.rootName || 'app';
Copy link
Member Author

Choose a reason for hiding this comment

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

@mixonic mixonic force-pushed the pass-referrer-v2 branch 4 times, most recently from 6d99bfa to ddac8d3 Compare July 1, 2017 22:43
@mixonic
Copy link
Member Author

mixonic commented Jul 1, 2017

With updates re: glimmerjs/glimmer-resolver#17 (comment)

* The referrer from Ember is not an absolute specifier. Do some string
  munging to clean it up. We would like this to be a build step
  on Ember template compilation at some point.
* Ember tries to namespace components with `components/` as a specifier
  namespace. Drop that, since MU rules say to look in the components
  collection anyway.
* Resolve with only a bare type and a referrer to look up route
  templates.
* Bump @glimmer/resolver
@mixonic mixonic merged commit 6614e68 into master Jul 2, 2017
@mixonic mixonic deleted the pass-referrer-v2 branch July 2, 2017 01:26
This was referenced Jul 2, 2017
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.

2 participants