Currently this plugin will only support the following construct:
var view = Backbone.View.extend({ ... });
However, a lot of people create an object first, and then use extend on it.
var view = { ... };
return Backbone.View.extend(view);
In the case above, this plugin will not identify the view object as a Backbone View. It should be possible to add comments around an object, to specify that it's going to be Backbone View/Model/Collection like this:
/* Backbone.View */
var view = { ... };
/* Backbone.View end */
return Backbone.View.extend(view);
Not that I would recommend trying to cover all cases, but for the simple cases, couldn't you use escope to read write references to the variable passed in to Backbone.View.extend (and similar)?
Currently this plugin will only support the following construct:
However, a lot of people create an object first, and then use extend on it.
In the case above, this plugin will not identify the
view
object as a Backbone View. It should be possible to add comments around an object, to specify that it's going to be Backbone View/Model/Collection like this: