noveogroup / backbone.iobind

Bind socket.io events to backbone models & collections. Also includes a drop-in replacement for Backbone.sync using socket.io.
https://noveogroup.github.io/backbone.iobind/
582 stars 65 forks source link

Alter prefix.js to check that window is a window and that require exists #56

Closed chrisnewtn closed 10 years ago

chrisnewtn commented 10 years ago

Hi, this is related to #40 and #41 and makes to library compatible with the requirejs optimizer. It preserves compatibility with commonjs and allows for its continued use with AMD loaders via a shim.

Thoughts and feedback welcome. Thanks.

mahnunchik commented 10 years ago

Hi @chrisnewtn, could you please check this solution in last commit: https://github.com/logicalparadox/backbone.iobind/commit/4ceee9d62694b53d272cc3765b6bb1061c5e56b9

chrisnewtn commented 10 years ago

Thanks for the fix @mahnunchik, that commit works great with the optimizer :thumbsup: