mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
8d1c29ae4c
commit
89a9ed4086
19 files changed
+4558
-239
No files matched your search
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
// Jest transformations -- this adds support for TypeScript
|
||||
// using ts-jest
|
||||
transform: {
|
||||
"^.+\\.tsx?$": "ts-jest"
|
||||
},
|
||||
|
||||
// Module file extensions for importing
|
||||
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"]
|
||||
};
|
||||
+4503
-215
File diff suppressed because it is too large.
Load diff
@@ -11,15 +11,18 @@
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.config.js",
|
||||
"dev": "npm run build --watch",
|
||||
"test": "echo NO TESTS"
|
||||
"test": "jest --env=jsdom src $@"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-open-doodles": "^1.0.5"
|
||||
"@types/jest": "^26.0.15",
|
||||
"react-open-doodles": "^1.0.5",
|
||||
"ts-jest": "^26.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@k8slens/extensions": "file:../../src/extensions/npm/extensions",
|
||||
"ts-loader": "^8.0.4",
|
||||
"typescript": "^4.0.3",
|
||||
"webpack": "^4.44.2"
|
||||
"webpack": "^4.44.2",
|
||||
"jest": "^26.6.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import '@testing-library/jest-dom/extend-expect'
|
||||
|
||||
import { ExamplePage } from "../page";
|
||||
|
||||
test('two plus two is four', () => {
|
||||
const { container } = render(<ExamplePage extension={this} />);
|
||||
expect(container).toBeInstanceOf(HTMLElement);
|
||||
});
|
||||
@@ -2,10 +2,10 @@ import { LensMainExtension } from "@k8slens/extensions";
|
||||
|
||||
export default class ExampleExtensionMain extends LensMainExtension {
|
||||
onActivate() {
|
||||
console.log('EXAMPLE EXTENSION MAIN: ACTIVATED', this.getMeta());
|
||||
console.log('EXAMPLE EXTENSION MAIN: ACTIVATED', this.name, this.id);
|
||||
}
|
||||
|
||||
onDeactivate() {
|
||||
console.log('EXAMPLE EXTENSION MAIN: DEACTIVATED', this.getMeta());
|
||||
console.log('EXAMPLE EXTENSION MAIN: DEACTIVATED', this.name, this.id);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
+1
-1
@@ -8,7 +8,7 @@ export default class ExampleExtension extends LensRendererExtension {
|
||||
path: "/extension-example",
|
||||
title: "Example Extension",
|
||||
components: {
|
||||
Page: () => <ExamplePage extension={this}/>,
|
||||
Page: () => <ExamplePage extension={this} />,
|
||||
MenuIcon: ExampleIcon,
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,11 @@
|
||||
"outDir": "dist",
|
||||
"module": "CommonJS",
|
||||
"target": "ES2017",
|
||||
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
||||
"lib": [
|
||||
"ESNext",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
"moduleResolution": "Node",
|
||||
"sourceMap": false,
|
||||
"declaration": false,
|
||||
@@ -17,7 +21,10 @@
|
||||
},
|
||||
"include": [
|
||||
"./*.ts",
|
||||
"./*.tsx"
|
||||
"./*.tsx",
|
||||
"src/renderer.tsx",
|
||||
"src/page.tsx",
|
||||
"src/main.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
|
||||
@@ -2,7 +2,7 @@ const path = require('path');
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
entry: './main.ts',
|
||||
entry: './src/main.ts',
|
||||
context: __dirname,
|
||||
target: "electron-main",
|
||||
mode: "production",
|
||||
@@ -23,7 +23,7 @@ module.exports = [
|
||||
}
|
||||
],
|
||||
resolve: {
|
||||
extensions: [ '.tsx', '.ts', '.js' ],
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
},
|
||||
output: {
|
||||
libraryTarget: "commonjs2",
|
||||
@@ -32,7 +32,7 @@ module.exports = [
|
||||
},
|
||||
},
|
||||
{
|
||||
entry: './renderer.tsx',
|
||||
entry: './src/renderer.tsx',
|
||||
context: __dirname,
|
||||
target: "electron-renderer",
|
||||
mode: "production",
|
||||
@@ -53,7 +53,7 @@ module.exports = [
|
||||
}
|
||||
],
|
||||
resolve: {
|
||||
extensions: [ '.tsx', '.ts', '.js' ],
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
},
|
||||
output: {
|
||||
libraryTarget: "commonjs2",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"build": "webpack -p",
|
||||
"dev": "webpack --watch",
|
||||
"test": "echo NO TESTS"
|
||||
"test": "jest --env=jsdom --passWithNoTests src $@"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.config.js",
|
||||
"dev": "npm run build --watch",
|
||||
"test": "echo NO TESTS"
|
||||
"test": "jest --env=jsdom --passWithNoTests src $@"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": "^7.3.2"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.config.js",
|
||||
"dev": "npm run build --watch",
|
||||
"test": "echo NO TESTS"
|
||||
"test": "jest --env=jsdom --passWithNoTests src $@"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.config.js",
|
||||
"dev": "npm run build --watch",
|
||||
"test": "echo NO TESTS"
|
||||
"test": "jest --env=jsdom --passWithNoTests src $@"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"scripts": {
|
||||
"build": "webpack -p",
|
||||
"dev": "webpack --watch",
|
||||
"test": "echo NO TESTS"
|
||||
"test": "jest --env=jsdom --passWithNoTests src $@"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"scripts": {
|
||||
"build": "webpack -p",
|
||||
"dev": "webpack --watch",
|
||||
"test": "echo NO TESTS"
|
||||
"test": "jest --env=jsdom --passWithNoTests src $@"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in new issue
Block a user