I have a few modules which have long lists of dependencies, which we aren't planning to refactor yet. The normal steal('dependency1', 'dependency2', function(d1, d2) { ... }); syntax still works, but it's rather difficult to read with >10 dependencies.
RequireJS has some syntactic sugar for handling this case, but I haven't found an equivalent approach in StealJS -- is there one?
The closest I've found is to do something like
Is there a better way to do this?
RequireJS has some syntactic sugar for handling this case, but I haven't found an equivalent approach in StealJS -- is there one?
The closest I've found is to do something like
- steal('dependency1', 'dependency2', function(/* args are ignored */) {
- var d1 = steal.Module.modules['dependency1'].value;
- var d2 = steal.Module.modules['dependency2'].value;
- // etc
- });
Is there a better way to do this?