-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Automated npm/browserify/cjs loader #2505
Conversation
@@ -652,7 +654,7 @@ EmberApp.prototype.javascript = function() { | |||
|
|||
var es6 = compileES6(applicationJs, { | |||
loaderFile: 'vendor/ember-cli/loader.js', | |||
ignoredModules: Object.keys(this.importWhitelist), | |||
ignoredModules: this._isIgnoredModule.bind(this), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An earlier idea I had was to pass ignored Modules by reference, which if preserved would allow updating the pojo to be sufficient. Last I looked, it was possible to fix the concatenator to ensure its binding wasn't broken.
Thoughts? This would also mitigate my later concern (although I do not know its magnitude so it may be worrying for no reason)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutating shared objects across module boundaries gives me the heeby jeebies.
Awesome, I am excited for this. I left some comments here and on ember-browserify, nothing blocking merely some feedback. |
Ya let's avoid the shared state. LGTM :) |
👍 |
@ef4 travis appears unhappy |
Yeah I think it's because I'm pointing at my es6 concatenator fork still and not a proper version number. |
I've opened the appropriate PR on joliss/es6-broccoli-concatenator project joliss/broccoli-es6-concatenator#29 |
Ok cool, good timing. I just squashed that branch to prepare to making a PR On Mon, Nov 17, 2014 at 10:41 PM, Stefan Penner [email protected]
|
:) |
@ef4 any ideas re: travis failures? |
@stefanpenner , yeah we're waiting on a semver-parsible version of broccoli-es6-concatenator that has the requisite changes. Once one is published I will update my PR to point at it.
|
we are still blocked on @joliss review + feedback on the broccoli-es6-concatenator project bumping this to |
😢 i want this so baddd |
6cc6d97
to
366e193
Compare
Automated npm/browserify/cjs loader
This closes #2283.
It extends the ember-cli addon API in two ways:
'js'
type ofpostprocessTree
. This was suggested by @rwjblue and it nicely solves this particular problem, while being generally useful for other addons.app.importWhitelistFilters
to register filters that determine which module names should be ignored by the es6 concatenator.With these extensions, my new ember-browserify addon can do the actual work of finding & packaging npm modules.
Remaining issues before this is ready to merge: