Support for Exoskeleton, but without jQuery and Underscore
PMK opened this issue · 3 comments
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?
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.
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
I've figured it out :)