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

Move packages/**/lib/main.js to packages/**/lib/index.js. #12648

Merged
merged 4 commits into from
Nov 29, 2015

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Nov 26, 2015

This follows suit with changes required by Glimmer, and changes upstream in ember-cli/[email protected].

packages/loader/lib/main.js was not moved because it is not an ES6 module (it is manually concatenated to the output). We can tweak this after the next round of updates to emberjs-build.

@rwjblue
Copy link
Member Author

rwjblue commented Nov 26, 2015

@stefanpenner - Can you double check the loader.js changes here? One of the next tasks is to unify and just use the version in ember-cli/loader.js, but this change lets us move on for now...

var mod = registry[name];

if (!mod) {
mod = registry[name + '/index'];
Copy link
Member

Choose a reason for hiding this comment

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

small nit-pick

name = name + '/index';
mode = registry[name];

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, updated.

@rwjblue rwjblue force-pushed the move-main-exports branch 2 times, most recently from 6a53fd3 to 86636f3 Compare November 26, 2015 15:53
@homu
Copy link
Contributor

homu commented Nov 27, 2015

☔ The latest upstream changes (presumably #12647) made this pull request unmergeable. Please resolve the merge conflicts.

@@ -13,13 +13,13 @@ import 'ember-routing-views';
import Ember from 'ember-metal/core';
import { runLoadHooks } from 'ember-runtime/system/lazy_load';

if (Ember.__loader.registry['ember-template-compiler']) {
if (Ember.__loader.registry['ember-template-compiler/index']) {
Copy link
Member

Choose a reason for hiding this comment

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

import require from 'require'

Copy link
Member Author

Choose a reason for hiding this comment

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

Ya, I'll update the requireModule part but I don't think require exposed the registry itself (though we could do that).

@rwjblue
Copy link
Member Author

rwjblue commented Nov 27, 2015

@stefanpenner - Updated for latest round of feedback (which has removed all usage of Ember.__loader in packages/**/*).

rwjblue added a commit that referenced this pull request Nov 29, 2015
Move `packages/**/lib/main.js` to `packages/**/lib/index.js`.
@rwjblue rwjblue merged commit 27862a1 into emberjs:master Nov 29, 2015
@rwjblue rwjblue deleted the move-main-exports branch November 29, 2015 01:07
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.

3 participants