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

Move in-tree extensions to top-level folder (#993)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-09-29 16:45:42 +03:00 committed by GitHub
parent 5ec6751ab4
commit 82c4177cb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
{ {
"extends": "../../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": ".", "outDir": ".",
"module": "CommonJS", "module": "CommonJS",
@ -7,7 +7,7 @@
"declaration": false "declaration": false
}, },
"include": [ "include": [
"../../../types", "../../types",
"./example-extension.tsx" "./example-extension.tsx"
] ]
} }

View File

@ -15,11 +15,12 @@
"dev-run": "nodemon --watch static/build/main.js --exec \"electron --inspect .\"", "dev-run": "nodemon --watch static/build/main.js --exec \"electron --inspect .\"",
"dev:main": "yarn compile:main --watch", "dev:main": "yarn compile:main --watch",
"dev:renderer": "yarn compile:renderer --watch", "dev:renderer": "yarn compile:renderer --watch",
"dev:extensions": "rollup --config src/extensions/rollup.config.js --watch", "dev:extensions": "yarn compile:extensions --watch",
"compile": "env NODE_ENV=production concurrently yarn:compile:*", "compile": "env NODE_ENV=production concurrently yarn:compile:*",
"compile:main": "webpack --config webpack.main.ts", "compile:main": "webpack --config webpack.main.ts",
"compile:renderer": "webpack --config webpack.renderer.ts", "compile:renderer": "webpack --config webpack.renderer.ts",
"compile:i18n": "lingui compile", "compile:i18n": "lingui compile",
"compile:extensions": "rollup --config src/extensions/rollup.config.js",
"build:linux": "yarn compile && electron-builder --linux --dir -c.productName=Lens", "build:linux": "yarn compile && electron-builder --linux --dir -c.productName=Lens",
"build:mac": "yarn compile && electron-builder --mac --dir -c.productName=Lens", "build:mac": "yarn compile && electron-builder --mac --dir -c.productName=Lens",
"build:win": "yarn compile && electron-builder --win --dir -c.productName=Lens", "build:win": "yarn compile && electron-builder --win --dir -c.productName=Lens",
@ -34,7 +35,7 @@
"download:kubectl": "yarn run ts-node build/download_kubectl.ts", "download:kubectl": "yarn run ts-node build/download_kubectl.ts",
"download:helm": "yarn run ts-node build/download_helm.ts", "download:helm": "yarn run ts-node build/download_helm.ts",
"lint": "eslint $@ --ext js,ts,tsx --max-warnings=0 src/", "lint": "eslint $@ --ext js,ts,tsx --max-warnings=0 src/",
"extensions:example": "tsc --project src/extensions/example-extension/tsconfig.json --watch" "extensions:example": "tsc --project extensions/example-extension/tsconfig.json --watch"
}, },
"config": { "config": {
"bundledKubectlVersion": "1.17.11", "bundledKubectlVersion": "1.17.11",
@ -94,9 +95,12 @@
"filter": "!**/main.js" "filter": "!**/main.js"
}, },
{ {
"from": "src/extensions/", "from": "extensions/",
"to": "./extensions/", "to": "./extensions/",
"filter": "**/*.js*" "filter": [
"**/*.js*",
"!**/node_modules"
]
}, },
"LICENSE" "LICENSE"
], ],

View File

@ -4,7 +4,6 @@ import path from "path";
import fs from "fs-extra"; import fs from "fs-extra";
import { action, observable, reaction, toJS, } from "mobx"; import { action, observable, reaction, toJS, } from "mobx";
import { BaseStore } from "../common/base-store"; import { BaseStore } from "../common/base-store";
import { isDevelopment } from "../common/vars";
import logger from "../main/logger"; import logger from "../main/logger";
export interface ExtensionStoreModel { export interface ExtensionStoreModel {
@ -44,9 +43,6 @@ export class ExtensionStore extends BaseStore<ExtensionStoreModel> {
@observable installed = observable.map<ExtensionId, InstalledExtension>([], { deep: false }); @observable installed = observable.map<ExtensionId, InstalledExtension>([], { deep: false });
get folderPath(): string { get folderPath(): string {
if (isDevelopment) {
return path.resolve(__static, "../src/extensions");
}
return path.resolve(__static, "../extensions"); return path.resolve(__static, "../extensions");
} }