mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Introduce empty Feature package for the dock
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
45a99d6c10
commit
4d2ee16436
6
packages/business-features/dock/.eslintrc.json
Normal file
6
packages/business-features/dock/.eslintrc.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "@k8slens/eslint-config/eslint",
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json"
|
||||
}
|
||||
}
|
||||
1
packages/business-features/dock/.prettierrc
Normal file
1
packages/business-features/dock/.prettierrc
Normal file
@ -0,0 +1 @@
|
||||
"@k8slens/eslint-config/prettier"
|
||||
21
packages/business-features/dock/README.md
Normal file
21
packages/business-features/dock/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# @k8slens/dock
|
||||
|
||||
This package contains stuff related to creating Lens-applications.
|
||||
|
||||
# Usage
|
||||
|
||||
```bash
|
||||
$ npm install @k8slens/dock
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { dockFeature } from "@k8slens/dock";
|
||||
import { registerFeature } from "@k8slens/feature-core";
|
||||
import { createContainer } from "@ogre-tools/injectable";
|
||||
|
||||
const di = createContainer("some-container");
|
||||
|
||||
registerFeature(di, dockFeature);
|
||||
```
|
||||
|
||||
## Extendability
|
||||
1
packages/business-features/dock/index.ts
Normal file
1
packages/business-features/dock/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export { dockFeature } from "./src/feature";
|
||||
1
packages/business-features/dock/jest.config.js
Normal file
1
packages/business-features/dock/jest.config.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForNode;
|
||||
42
packages/business-features/dock/package.json
Normal file
42
packages/business-features/dock/package.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@k8slens/dock",
|
||||
"private": false,
|
||||
"version": "1.0.0-alpha.0",
|
||||
"description": "Highly extendable dock in the Lens.",
|
||||
"type": "commonjs",
|
||||
"files": [
|
||||
"agnostic/dist"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lensapp/lens.git"
|
||||
},
|
||||
"main": "agnostic/dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"author": {
|
||||
"name": "OpenLens Authors",
|
||||
"email": "info@k8slens.dev"
|
||||
},
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/lensapp/lens",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"dev": "webpack --mode=development --watch",
|
||||
"test:unit": "jest --coverage --runInBand",
|
||||
"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-auto-registration": "^15.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@async-fn/jest": "^1.6.4",
|
||||
"@k8slens/eslint-config": "6.5.0-alpha.1"
|
||||
}
|
||||
}
|
||||
14
packages/business-features/dock/src/feature.ts
Normal file
14
packages/business-features/dock/src/feature.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { getFeature } from "@k8slens/feature-core";
|
||||
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
|
||||
|
||||
export const dockFeature = getFeature({
|
||||
id: "dock",
|
||||
|
||||
register: (di) => {
|
||||
autoRegister({
|
||||
di,
|
||||
targetModule: module,
|
||||
getRequireContexts: () => [require.context("./", true, /\.injectable\.(ts|tsx)$/)],
|
||||
});
|
||||
},
|
||||
});
|
||||
4
packages/business-features/dock/tsconfig.json
Normal file
4
packages/business-features/dock/tsconfig.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": "@k8slens/typescript/config/base.json",
|
||||
"include": ["**/*.ts", "**/*.tsx"]
|
||||
}
|
||||
1
packages/business-features/dock/webpack.config.js
Normal file
1
packages/business-features/dock/webpack.config.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require("@k8slens/webpack").configForNode;
|
||||
Loading…
Reference in New Issue
Block a user