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

Cleanup router & DSL processing. #12749

Merged
merged 1 commit into from
Dec 23, 2015
Merged

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Dec 23, 2015

  • Remove manual threading of moduleBasedResolver. As of the most
    recent resolver changes we can directly ask the "real" resolver when
    we need to. This avoids poluting a bunch of places with
    moduleBasedResolver that do not care about that flag.
  • Prevent creating additional closure just to create application route.
  • Avoid manually recreating input options for each layer of DSL (just
    pass options down).
  • Make DSL creation a separate function.

No public API changes, only small refactoring to clean up some things that I saw while making a plan for Engine work...

@@ -129,6 +133,18 @@ var EmberRouter = EmberObject.extend(Evented, {
return get(this, 'location').getURL();
}),

_isModuleBasedResolver() {
Copy link
Member

Choose a reason for hiding this comment

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

As an instance method on the router, _isModuleBasedResolver() might be named more clearly as _hasModuleBasedResolver() or even simply _moduleBasedResolver().

Copy link
Member Author

Choose a reason for hiding this comment

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

SG, will update

@dgeb
Copy link
Member

dgeb commented Dec 23, 2015

LGTM besides that one naming nit.

* Remove manual threading of `moduleBasedResolver`. As of the most
  recent resolver changes we can directly ask the "real" resolver when
  we need to. This avoids poluting a bunch of places with
  `moduleBasedResolver` that do not care about that flag.
* Prevent creating additional closure just to create application route.
* Avoid manually recreating input options for each layer of DSL (just
  pass options down).
* Make DSL creation a separate function.
rwjblue added a commit that referenced this pull request Dec 23, 2015
Cleanup router & DSL processing.
@rwjblue rwjblue merged commit 2d622f1 into emberjs:master Dec 23, 2015
@rwjblue rwjblue deleted the router-cleanup branch December 23, 2015 20:48
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