I'm trying to include Backbone.Epoxy in a WordPress plugin, but the jQuery that WordPress ships has noConflict turned on by default. Constructing a view results in a "TypeError: $ is not a function" error.
I started on a pull request, but abandoned it. It looks like the tests are fairly reliant on $ being the jQuery/Zepto instance, and I'm not sure my environment is set up right because the minification build generates a large diff for a tiny change.
Thanks for Backbone.Epoxy. It's just the right amount of opinionatedness and has already saved me a lot of time.
I'm trying to include Backbone.Epoxy in a WordPress plugin, but the jQuery that WordPress ships has noConflict turned on by default. Constructing a view results in a "TypeError: $ is not a function" error.
https://github.com/gmac/backbone.epoxy/blob/8cef8fff1825c59f96a2e1f13fc6b86f71f9a0f0/backbone.epoxy.js#L1055
Changing this line:
to this line:
seems to fix the problem.
I started on a pull request, but abandoned it. It looks like the tests are fairly reliant on $ being the jQuery/Zepto instance, and I'm not sure my environment is set up right because the minification build generates a large diff for a tiny change.
Thanks for Backbone.Epoxy. It's just the right amount of opinionatedness and has already saved me a lot of time.