ember-cli / rfcs

Archive of RFCs for changes to ember-cli (for current RFC repo see https://github.com/emberjs/rfcs)
45 stars 54 forks source link

Anonymous AMD proposal #55

Closed ef4 closed 8 years ago

ef4 commented 8 years ago

Rendered

Related to https://github.com/ember-cli/ember-cli/pull/5976

krisselden commented 8 years ago

This is awesome

nathanhammond commented 8 years ago

I'm in favor of this change. Other approaches to do things like this include running your own processing step and then shoving the result into the vendor tree. This dramatically improves that story.

My only hesitations are small:

Note that I'm in favor even with those hesitations.

ef4 commented 8 years ago

@nathanhammond can you elaborate on "may make it harder to support some build time tooling for rollup-like behavior"? I don't fully understand that part.

Perhaps you're concerned that my implementation is hiding the real module inside an extra layer? The API doesn't wed us to that behavior -- I think the API leaves us free to alter the implementation.

stefanpenner commented 8 years ago

@ef4 this looks great, three things:

stefanpenner commented 8 years ago

@ef4 friendly ping

ef4 commented 8 years ago

@stefanpenner I pushed some edits that address your questions, except for

this AMD isn't really a full tree of AMD rather a single file. We should be sure to document this.

AFAIK, app.import already doesn't do trees, so that is not specific to this issue. Plus I really don't know what it would mean to import a tree of anonymous AMD -- I don't think that's a well-defined thing (how could the modules in the tree find each other if they're really still anonymous?).

I also changed the proposed API based on discussion in https://github.com/ember-cli/ember-cli/pull/5976 so that we reserve API-space for future transformations, which can eventually become pluggable.

stefanpenner commented 8 years ago

@ef4 this has been in PFC for some time, did the core team reach a consensus that I missed or did we drop the ball?

If so, I do feel good about this change. Should we maybe give core until this friday to object, then we ship?

stefanpenner commented 8 years ago

this has survived PFC