Skip to content

Commit

Permalink
Merge pull request #1 from suse-edge/test-extension
Browse files Browse the repository at this point in the history
Testing of release of multiple extensions
  • Loading branch information
jtomasek committed Jul 28, 2023
2 parents f12b504 + 7ce4005 commit b8487ba
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kubevirt/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "suse-edge-kubevirt-extension",
"description": "KubeVirt Rancher Dashboard extension",
"version": "0.1.0",
"version": "0.1.1",
"license": "Apache-2.0",
"private": false,
"rancher": true,
Expand Down
1 change: 1 addition & 0 deletions pkg/test/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./.shell/pkg/babel.config.js');
14 changes: 14 additions & 0 deletions pkg/test/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { importTypes } from '@rancher/auto-import';
import { IPlugin } from '@shell/core/types';

// Init the package
export default function(plugin: IPlugin): void {
// Auto-import model, detail, edit from the folders
importTypes(plugin);

// Provide plugin metadata from package.json
plugin.metadata = require('./package.json');

// Load a product
plugin.addProduct(require('./product'));
}
24 changes: 24 additions & 0 deletions pkg/test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "test",
"description": "test plugin",
"version": "0.1.0",
"private": false,
"rancher": true,
"scripts": {
"dev": "./node_modules/.bin/nuxt dev",
"nuxt": "./node_modules/.bin/nuxt"
},
"engines": {
"node": ">=12"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.5.18",
"@vue/cli-service": "4.5.18",
"@vue/cli-plugin-typescript": "4.5.18"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
13 changes: 13 additions & 0 deletions pkg/test/product.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { IPlugin } from '@shell/core/types';

export function init($plugin: IPlugin, store: any) {
const YOUR_PRODUCT_NAME = 'myProductName';

const { product } = $plugin.DSL(store, YOUR_PRODUCT_NAME);

product({
icon: 'gear',
inStore: 'management',
weight: 100
});
}
53 changes: 53 additions & 0 deletions pkg/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"compilerOptions": {
"allowJs": true,
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"preserveSymlinks": true,
"typeRoots": [
"../../node_modules",
"../../node_modules/@rancher/shell/types"
],
"types": [
"node",
"webpack-env",
"@types/node",
"@types/jest",
"@types/lodash",
"rancher",
"shell"
],
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
],
"paths": {
"@shell/*": [
"../../node_modules/@rancher/shell/*"
],
"@components/*": [
"@rancher/components/*"
]
}
},
"include": [
"**/*.ts",
"**/*.d.ts",
"**/*.tsx",
"**/*.vue"
],
"exclude": [
"../../node_modules"
]
}
1 change: 1 addition & 0 deletions pkg/test/vue.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./.shell/pkg/vue.config')(__dirname);

0 comments on commit b8487ba

Please sign in to comment.