From 3aa383c53f1b2eb087ada5d00b70e0aac19209c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B4=9B=E5=B8=8C=E9=9B=85?= Date: Thu, 25 Apr 2024 08:37:30 +0800 Subject: [PATCH] deploy.js --- .gitignore | 1 + deploy.js | 4 ++-- package.json | 1 + src/settings.ts | 2 +- typings/components.d.ts | 1 - 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 1636720..6c6ecad 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ pnpm* stats.html ts-out-dir platform.json +archive.zip diff --git a/deploy.js b/deploy.js index 7d87967..40b88b1 100644 --- a/deploy.js +++ b/deploy.js @@ -106,10 +106,10 @@ async function main() { // await exec(`unzip -O gbk ${archivePath} -d ${target}`) //} else { await exec(`unzip ${archivePath} -d ${target}`) - await exec(`mv ${target}/dist ${target}/iGame`) + await exec(`mv ${target}/dist ${target}/home`) //} - const nginxTarget = '/home/lolosia/nginx/home' + const nginxTarget = '/home/lolosia/nginx' console.log('移除旧目录 ...') await sudo(`rm -rf ${nginxTarget}/${nginxContentPath}`) diff --git a/package.json b/package.json index 954fae4..9996328 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "vitest": "vitest --ui", "tsc-check": "tsc", "coverage": "vitest run --coverage", + "deploy": "node deploy.js", "preinstall": "only-allow pnpm" }, "dependencies": { diff --git a/src/settings.ts b/src/settings.ts index d4ab160..a8dc9e2 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -87,7 +87,7 @@ export const settings: SettingsConfig = { /* * vite.config.js base config * */ - viteBasePath: '/vue-admin-plus/', + viteBasePath: '/home/', /* * i18n setting default language diff --git a/typings/components.d.ts b/typings/components.d.ts index 646dea0..422d0fb 100644 --- a/typings/components.d.ts +++ b/typings/components.d.ts @@ -8,7 +8,6 @@ export {} declare module 'vue' { export interface GlobalComponents { AppPage: typeof import('./../src/components/AppPage.vue')['default'] - Container: typeof import('@/components/AppPage.vue')['default'] ElSvgIcon: typeof import('./../src/components/ElSvgIcon.vue')['default'] IconSelector: typeof import('./../src/components/IconSelector.vue')['default'] MenuIcon: typeof import('./../src/components/MenuIcon.vue')['default']