mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
wip: restructure to monorepo
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
7052dc0dba
commit
1be9923b21
3161 files changed
+5723
-3776
No files matched your search
@@ -1,2 +1,3 @@
|
||||
dist/
|
||||
__mocks__/
|
||||
node_modules/
|
||||
@@ -5,8 +5,8 @@
|
||||
"version": "6.0.0",
|
||||
"copyright": "© 2022 OpenLens Authors",
|
||||
"license": "MIT",
|
||||
"main": "dist/src/extensions/extension-api.js",
|
||||
"types": "dist/src/extensions/extension-api.d.ts",
|
||||
"main": "dist/src/extension-api.js",
|
||||
"types": "dist/src/extension-api.d.ts",
|
||||
"files": [
|
||||
"dist/**/*.ts",
|
||||
"__mocks__/*.ts",
|
||||
@@ -15,17 +15,19 @@
|
||||
"author": {
|
||||
"name": "OpenLens Authors"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn run webpack --config webpack/extensions.ts",
|
||||
"build-docs": "yarn run typedoc src/extension-api.ts",
|
||||
"clean": "rm -rf dist/"
|
||||
},
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.12.3",
|
||||
"@types/node": "^16.11.58",
|
||||
"@types/react": "^17.0.45",
|
||||
"@types/react-dom": "^17.0.16",
|
||||
"@types/react-router": "^5.1.18",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"conf": "^7.0.1",
|
||||
"mobx": "^6.5.0",
|
||||
"mobx-react": "^7.3.0",
|
||||
"react-select": "^5.3.2",
|
||||
"typed-emitter": "^1.3.1"
|
||||
"@k8slens/open-lens": "^6.4.0-alpha.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typedoc": "0.23.23",
|
||||
"typedoc-plugin-markdown": "^3.13.6",
|
||||
"typescript": "^4.9.4",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-cli": "^5.0.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { extensionApi as main } from "@k8slens/open-lens/main";
|
||||
import { extensionApi as renderer } from "@k8slens/open-lens/renderer";
|
||||
import { extensionApi as common } from "@k8slens/open-lens/common";
|
||||
|
||||
const Main = { ... main } as typeof main;
|
||||
const Renderer = { ...renderer } as typeof renderer;
|
||||
const Common = { ... common } as typeof common;
|
||||
|
||||
export {
|
||||
Main,
|
||||
Renderer,
|
||||
Common,
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"*": [
|
||||
"node_modules/*",
|
||||
"types/*"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "typescript-plugin-css-modules",
|
||||
"options": {
|
||||
"namedExports": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"../core/types/*.d.ts",
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"../core/src/"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"readme": "docs/extensions/typedoc-readme.md.tpl",
|
||||
"name": "@k8slens/extensions",
|
||||
"out": "../../docs/extensions/api",
|
||||
"excludePrivate": true,
|
||||
"includes": [
|
||||
"src/"
|
||||
],
|
||||
"hideBreadcrumbs": true,
|
||||
"disableSources": true
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
|
||||
import path from "path";
|
||||
import type webpack from "webpack";
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV !== "production";
|
||||
|
||||
export default function generateExtensionTypes(): webpack.Configuration {
|
||||
return {
|
||||
// Compile for Electron for renderer process
|
||||
// see <https://webpack.js.org/configuration/target/>
|
||||
target: "electron-renderer",
|
||||
entry: "./src/extension-api.ts",
|
||||
// this is the default mode, so we should make it explicit to silence the warning
|
||||
mode: isDevelopment ? "development" : "production",
|
||||
output: {
|
||||
filename: "extension-api.js",
|
||||
// need to be an absolute path
|
||||
path: path.resolve("./dist/"),
|
||||
// can be use in commonjs environments
|
||||
// e.g. require('@k8slens/extensions')
|
||||
libraryTarget: "commonjs",
|
||||
},
|
||||
cache: isDevelopment,
|
||||
optimization: {
|
||||
minimize: false, // speed up types compilation
|
||||
},
|
||||
ignoreWarnings: [
|
||||
/Critical dependency: the request of a dependency is an expression/, // see who is using request: "npm ls request"
|
||||
/require.extensions is not supported by webpack./, // handlebars
|
||||
],
|
||||
stats: "errors-warnings",
|
||||
externals: [
|
||||
"@k8slens/open-lens/common",
|
||||
"@k8slens/open-lens/main",
|
||||
"@k8slens/open-lens/renderer",
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.node$/,
|
||||
loader: "ignore-loader",
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
// !! ts-loader will use tsconfig.json at folder root
|
||||
// !! changes in tsconfig.json may have side effects
|
||||
// !! on '@k8slens/extensions' module
|
||||
compilerOptions: {
|
||||
declaration: true, // output .d.ts
|
||||
sourceMap: false, // to override sourceMap: true in tsconfig.json
|
||||
outDir: path.resolve("./dist/"), // where the .d.ts should be located
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".tsx", ".js"],
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user