1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

feat: Introduce feature adapter for injectable-react and injectable-mobx

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2023-04-14 07:58:48 +03:00
parent 7892d76b5d
commit 19c24b0998
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
7 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# @k8slens/feature-injectable
This package contains feature adapters for registering certain `@ogre-tools/injectable` extensions.

View File

@ -0,0 +1,2 @@
export { injectableReactFeature } from "./src/injectable-react-feature";
export { injectableMobXFeature } from "./src/injectable-mobx-feature";

View File

@ -0,0 +1,34 @@
{
"name": "@k8slens/basic-dependency-features",
"description": "Contains basic Features that can be used as dependency Features to make clients of a Feature not need to know about dependencies of the Feature.",
"version": "1.0.0-alpha.0",
"type": "commonjs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"private": false,
"files": [
"dist"
],
"author": {
"name": "OpenLens Authors",
"email": "info@k8slens.dev"
},
"license": "MIT",
"homepage": "https://github.com/lensapp/lens",
"scripts": {
"clean": "rimraf dist/",
"build": "webpack",
"lint": "lens-lint",
"lint:fix": "lens-lint --fix"
},
"peerDependencies": {
"@k8slens/feature-core": "^6.5.0-alpha.0",
"@ogre-tools/injectable": "^15.1.2",
"@ogre-tools/injectable-extension-for-mobx": "^15.1.2",
"@ogre-tools/injectable-react": "^15.1.2"
}
}

View File

@ -0,0 +1,11 @@
import { getFeature } from "@k8slens/feature-core";
import type { DiContainer } from "@ogre-tools/injectable";
import { registerMobX } from "@ogre-tools/injectable-extension-for-mobx";
export const injectableMobXFeature = getFeature({
id: "injectable-mobx",
register: (di) => {
registerMobX(di as DiContainer);
},
});

View File

@ -0,0 +1,11 @@
import { getFeature } from "@k8slens/feature-core";
import type { DiContainer } from "@ogre-tools/injectable";
import { registerInjectableReact } from "@ogre-tools/injectable-react";
export const injectableReactFeature = getFeature({
id: "injectable-react",
register: (di) => {
registerInjectableReact(di as DiContainer);
},
});

View File

@ -0,0 +1,3 @@
{
"extends": "@k8slens/typescript/config/base.json"
}

View File

@ -0,0 +1 @@
module.exports = require("@k8slens/webpack").configForNode;