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

Restructure on disk #176

Merged
merged 1 commit into from
Mar 13, 2017
Merged

Conversation

mixonic
Copy link
Member

@mixonic mixonic commented Mar 13, 2017

As we add support for the module unification layout the project will likely end up with two more resolvers:

  • addons/resolvers/module-unification
  • addons/resolvers/migration

Pave the path for that. Additionally, drop the create polyfill assertion as this library only supports IE9+ where Object.create is present.

As we add support for the module unification layout the project will
likely end up with two more resolvers:

* addons/resolvers/module-unification
* addons/resolvers/migration

Pave the path for that. Additionally, drop the `create` polyfill
assertion as this library only supports IE9+ where Object.create is
present.

const create = (Object.create || Ember.create);
if (!(create && !create(null).hasOwnProperty)) {
throw new Error("This browser does not support Object.create(null), please polyfil with es5-sham: http://git.io/yBU2rg");
Copy link
Member Author

Choose a reason for hiding this comment

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

No longer needed, Object.create is present in IE9+

requirejs.entries = requirejs._eak_seen;
}

function ModuleRegistry(entries) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved this to be an ES class in the classic resolver. I would like to add a module-registries/ directory later when adding module unification support, but the registries in that directory should be compatible with Glimmer module registries IMO, and I'd like this non-standard one (which is only used in one place AFAICT) to not live there.

this._entries = entries || requirejs.entries;
}
moduleNames() {
return (Object.keys || Ember.keys)(this._entries);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can safely drop Ember.keys

@stefanpenner stefanpenner merged commit 7b423a2 into ember-cli:master Mar 13, 2017
@stefanpenner stefanpenner deleted the restructure branch March 13, 2017 22:30
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