I have not found a great solution for this, but here is what I am doing.
If I just want to access one module, I type in all the required spell:
> require(['models/foo'], function(foo) { window.foo = foo; }); > foo.something();
Sometimes, if I need access to several modules, I first define a one-line helper
> var req = function(module, name) { require([module], function(m) { window[name] = m; });} > req('models/foo', 'foo'); > req('models/bar', 'bar'); > foo.something(bar);
And if I need an existing instance of something, I just set a breakpoint in the debugger and use the locales that are available in the console in break mode.
I would definitely be interested in a better way as well.
source share