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

Patch Application directly #1

Closed
jamesplease opened this issue Feb 8, 2015 · 7 comments
Closed

Patch Application directly #1

jamesplease opened this issue Feb 8, 2015 · 7 comments

Comments

@jamesplease
Copy link
Member

require('marionette.module').shim(Marionette.Application);

^ That is unnecessary

require('marionette.module');

^ that is all that the API needs to be.

@samccone
Copy link
Member

samccone commented Feb 8, 2015

So you see this lib requiring marionette and then patching it?
it is kinda nasty to monkey patch a lib silently, I prefer this explicit approach, however open to thoughts on either side of the fence.

@cmaher
Copy link
Member

cmaher commented Feb 8, 2015

how about require('marionette.module').shim(Marionette)?

This will ensure that the proper Marionette is shimmed, and it will ensure that the shim will only be added to the application.

@samccone
Copy link
Member

samccone commented Feb 8, 2015

yeah I like that @cmaher ^

@jamesplease
Copy link
Member Author

soundsgood2me

@jamesplease
Copy link
Member Author

change show the shim works

:P

@jasonLaster
Copy link
Member

Lolz the inspector cries race condition. It's cool though...

@samccone
Copy link
Member

samccone commented Feb 9, 2015

im sorry :(

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

No branches or pull requests

4 participants