Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Support for Exoskeleton, but without jQuery and Underscore #842

Open
PMK opened this issue Dec 13, 2014 · 3 comments
Open

Support for Exoskeleton, but without jQuery and Underscore #842

PMK opened this issue Dec 13, 2014 · 3 comments

Comments

@PMK
Copy link

PMK commented Dec 13, 2014

Both jQuery and Underscore are now fully optional in Exoskeleton, see https://github.com/paulmillr/exoskeleton/issues/102.
If you use Exoskeleton instead of Backbone with Chaplin, and you're not using jQuery and Underscore, Chaplin calls Backbone.View, but should call Backbone.NativeView. An error will be triggered, see paulmillr/exoskeleton@b8e5dc9.

Can you implement the option to use Chaplin with Exoskeleton, but without jQuery and Underscore?

@akre54
Copy link
Contributor

akre54 commented Dec 14, 2014

Right so in this case you'd need to either set Backbone.View = Backbone.NativeView before loading Chaplin, or _.extend(Backbone.View.prototype, Backbone.NativeViewMixin) before calling any view methods.

I made a branch of Chaplin a few months ago to support Backbone.NativeView but got sidetracked. I'll push it up and maybe try to work on it if I get support.

@Apophenian
Copy link

I'm having trouble getting this working in a exoskeleton/lodash/chaplin environment with requirejs.

If I call _.extend(Backbone.View.prototype, Backbone.NativeViewMixin) it seems to go into an infinite loop in chaplin's utils.getPrototypeChain, and I'm not sure of the best place to put

Backbone.View = Backbone.NativeView

Any help would be much appreciated

@Apophenian
Copy link

I've figured it out :)

viniciusHagamenon pushed a commit to movedigital/brunch-moved-skeleton that referenced this issue May 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants