CommandLineInterface constructor
CommandLineInterface({
- List<
MineralPackageContract> packages = const [],
Implementation
CommandLineInterface({ this.packages = const [] }) {
ioc.bind((ioc) => ConsoleService(theme: ConsoleTheme()));
ioc.bind((ioc) => EnvironmentService());
register([
MakeEvent(_console),
MakeCommand(_console),
MakeSharedState(_console),
MakePackage(_console),
MakeService(_console),
CompileExecutable(_console),
CompileJavascript(_console),
Help(_console, _commands),
]);
for (final package in packages) {
ioc.bind((ioc) => package);
register(package.injectCommands());
}
}