mirror of
https://github.com/halo-dev/plugin-starter.git
synced 2025-10-15 23:53:23 +00:00
refactor: update admin frontend template
Signed-off-by: Ryan Wang <i@ryanc.cc>
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
||||
},
|
||||
"dependencies": {
|
||||
"@halo-dev/admin-shared": "link:/Users/ryanwang/Workspace/github/ruibaby/halo-admin-next/packages/shared",
|
||||
"@halo-dev/components": "link:/Users/ryanwang/Workspace/github/ruibaby/halo-admin-next/packages/components",
|
||||
"@halo-dev/admin-shared": "link:/Users/ryanwang/Workspace/github/halo-dev/halo-admin-next/packages/shared",
|
||||
"@halo-dev/components": "link:/Users/ryanwang/Workspace/github/halo-dev/halo-admin-next/packages/components",
|
||||
"vue": "^3.2.36"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
8
admin-frontend/pnpm-lock.yaml
generated
8
admin-frontend/pnpm-lock.yaml
generated
@@ -1,8 +1,8 @@
|
||||
lockfileVersion: 5.4
|
||||
|
||||
specifiers:
|
||||
'@halo-dev/admin-shared': link:/Users/ryanwang/Workspace/github/ruibaby/halo-admin-next/packages/shared
|
||||
'@halo-dev/components': link:/Users/ryanwang/Workspace/github/ruibaby/halo-admin-next/packages/components
|
||||
'@halo-dev/admin-shared': link:/Users/ryanwang/Workspace/github/halo-dev/halo-admin-next/packages/shared
|
||||
'@halo-dev/components': link:/Users/ryanwang/Workspace/github/halo-dev/halo-admin-next/packages/components
|
||||
'@rushstack/eslint-patch': ^1.1.0
|
||||
'@types/jsdom': ^16.2.14
|
||||
'@types/node': ^16.11.36
|
||||
@@ -24,8 +24,8 @@ specifiers:
|
||||
vue-tsc: ^0.35.2
|
||||
|
||||
dependencies:
|
||||
'@halo-dev/admin-shared': link:../../../ruibaby/halo-admin-next/packages/shared
|
||||
'@halo-dev/components': link:../../../ruibaby/halo-admin-next/packages/components
|
||||
'@halo-dev/admin-shared': link:../../../halo-dev/halo-admin-next/packages/shared
|
||||
'@halo-dev/components': link:../../../halo-dev/halo-admin-next/packages/components
|
||||
vue: 3.2.37
|
||||
|
||||
devDependencies:
|
||||
|
@@ -1,12 +1,11 @@
|
||||
import type { Plugin } from "@halo-dev/admin-shared/src/types";
|
||||
import { definePlugin } from "@halo-dev/admin-shared";
|
||||
import DefaultView from "./views/DefaultView.vue";
|
||||
import { IconGrid } from "@halo-dev/components";
|
||||
import "./styles/index.css";
|
||||
|
||||
const plugin: Plugin = {
|
||||
export default definePlugin({
|
||||
name: "PluginTemplate",
|
||||
components: [],
|
||||
extensionPoints: {},
|
||||
routes: [
|
||||
{
|
||||
path: "/hello-world",
|
||||
@@ -26,11 +25,11 @@ const plugin: Plugin = {
|
||||
],
|
||||
},
|
||||
],
|
||||
extensionPoints: {},
|
||||
activated() {
|
||||
// TODO
|
||||
},
|
||||
deactivated() {
|
||||
// TODO
|
||||
},
|
||||
};
|
||||
export default plugin;
|
||||
});
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import {fileURLToPath, URL} from "url";
|
||||
import { fileURLToPath, URL } from "url";
|
||||
|
||||
import {defineConfig} from "vite";
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
|
||||
@@ -13,7 +13,9 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: fileURLToPath(new URL("../src/main/resources/admin", import.meta.url)),
|
||||
outDir: fileURLToPath(
|
||||
new URL("../src/main/resources/admin", import.meta.url)
|
||||
),
|
||||
emptyOutDir: true,
|
||||
lib: {
|
||||
entry: "src/index.ts",
|
||||
@@ -26,7 +28,8 @@ export default defineConfig({
|
||||
output: {
|
||||
globals: {
|
||||
vue: "Vue",
|
||||
"@halo-dev/components": "components",
|
||||
"@halo-dev/components": "HaloComponents",
|
||||
"@halo-dev/admin-shared": "HaloAdminShared",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user