mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Start monster beat-down after application is loaded in Lens
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
parent
00831edd55
commit
bd2e60bfa7
@ -31,6 +31,7 @@
|
||||
"lint:fix": "lens-lint --fix"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@k8slens/application": "*",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||
"@ogre-tools/fp": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { gameInjectable } from "./monster-beatdown.injectable";
|
||||
import { afterApplicationIsLoadedInjectionToken } from "@k8slens/application";
|
||||
|
||||
const startGameAfterApplicationIsLoadedInjectable = getInjectable({
|
||||
id: "start-game-after-application-is-loaded",
|
||||
|
||||
instantiate: (di) => ({
|
||||
run: () => {
|
||||
di.inject(gameInjectable).start();
|
||||
},
|
||||
}),
|
||||
|
||||
injectionToken: afterApplicationIsLoadedInjectionToken,
|
||||
});
|
||||
|
||||
export default startGameAfterApplicationIsLoadedInjectable;
|
||||
@ -9,11 +9,12 @@ import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registra
|
||||
import { registerFeature } from "@k8slens/feature-core";
|
||||
import {
|
||||
applicationFeature,
|
||||
startApplicationInjectionToken
|
||||
startApplicationInjectionToken,
|
||||
} from "@k8slens/application";
|
||||
import { createContainer } from "@ogre-tools/injectable";
|
||||
import { registerMobX } from "@ogre-tools/injectable-extension-for-mobx";
|
||||
import { registerInjectableReact } from "@ogre-tools/injectable-react";
|
||||
import { gabrielFeature } from "@k8slens/kata-for-gabriel";
|
||||
|
||||
const environment = "renderer";
|
||||
|
||||
@ -23,7 +24,7 @@ runInAction(() => {
|
||||
registerMobX(di);
|
||||
registerInjectableReact(di);
|
||||
registerLensCore(di, environment);
|
||||
registerFeature(di, applicationFeature);
|
||||
registerFeature(di, applicationFeature, gabrielFeature);
|
||||
|
||||
autoRegister({
|
||||
di,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user