Codecademy/backbone.declarative — pull request #3 by philfreo (2012-12-28 22:30:39+00:00)
Title: Auto cleanup in remove + upgrade backbone version

- Using a git submodule to include backbone instead of relying on node_modules -- since in later versions of backbone `test/` is included in their `.npmignore` then we can't use it anymore. Using a submodule now instead.
- Automatically cleaning up events in `View#remove`

Question: should we be using the new `View#listenTo`? I tried a version with `this.listenTo()` instead of `this[prop].on()`. If we don't care about keeping the `unbindXEvents` in an API, then we could remove a lot of the code completely (`remove`, `_unbindDeclarativeEvents`, `viewMethods`, etc.) and just rely on `stopListening` from Backbone.View#remove.