I am new to RequireJS. Until now, when I am developing apps, I find it very useful to create a global namespace in order to be able to test and debug my app from the chrome web inspector or the like.
For example (using knockout.js), I could define my view model somewhere in the global namspace and then just inspect it with:
ko.toJSON(viewModel);
Or Using backbone.js:
var App = {};
App.Model = Backbone.Model.extend({...});
//(Lets say I want to start my app with jQuery ready function)
$(function(){
App.model = new App.Model();
});
And then from the console to test that my model is working properly:
App.model.fetch();
Is there a way to accomplish this while using RequireJS?