-
Notifications
You must be signed in to change notification settings - Fork 39
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
Create a backwards compat shim for backbone views/human views. #33
Comments
Agree. I guess we could also add some kind of error/info if there's no |
Created a mixin using the pattern outlined above: https://github.com/whobubble/ampersand-view-jquery-mixin. Not sure about the hard dependency to jQuery, which puts the 2M down although jQuery might already be required somewhere else. I guess it is better to be explicit regarding this dep and incur the risk of jQuery being present in node_modules tree more than once. |
@whobubble: Thanks for writing this! Our team will use it when we start transitioning apps to ampersand.
I was recently surprised to discover that npm won't install a dependency more than once if a matching version is already present in a parent (or grandparent) node_modules folder. This is ok b/c when So if your jQuery semver string is inclusive enough and matches what's already installed at a higher level, npm won't install jQuery twice. Since the view-jquery mixin itself doesn't need a specific version of jQuery, perhaps |
@prust: I tested it and it works as you describe it: using |
@whobubble: you're welcome; I'm glad it worked! 😄 |
Going to close this as it's covered pretty well by @whobubble here: https://github.com/whobubble/ampersand-view-jquery-mixin Awesome work all! |
Update deps to survive get-object-path@^0.0.2 being removed from npm
Suggested by: @whobubble, the two things that are tripping him up transitioning from humanview are a lack of this.$ and this.$el, we've covered this.$ already in the learn page, but a mixin that also updated this.$el would be really useful too.
I think it would be as little code as this: but it's late and it's been a long day :)
The text was updated successfully, but these errors were encountered: