You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
So, we remove the injector.register() method, and instead, we assume that every exported symbol in a module is available to the injector by name. So a module a.js:
class Something {}
export var something = Something;
and bootstrap:
injector.require('something', './a');
then injector.resolve('something') will do a require('./a') and then get 'something' from the returned module.
By the way, exported symbols that are not mentioned in the bootstrap will not be available, because the injector won't know in which module to look for them, which is a Good Thing.
Commands
Commands are made available through injector.registerCommand. This can also be removed and let the injector look for commands in a specially named exported variable, e.g.:
export var $commands = {
"test|ios": TestIosCommand,
"test|android": TestAndroidCommand
};
So, now the injector will look for the command implementation in module.$commands[commandName]
Activity
ligaz commentedon Oct 29, 2015
We can introduce a
@Command("test|ios")decorator to annotate the commands.