feat: 新增build:auto可以一键直接build出exe文件

This commit is contained in:
539943419 committed 2024-08-29 15:56:19 +08:00
1 parent ef5a8f1a9e
commit 2d401f7a17
3 files changed
+48 -46

No files matched your search

+2 -1
View File
@@ -23,4 +23,5 @@ dist-ssr
*.sln *.sln
*.sw? *.sw?
.vscode .vscode
serve serve
miao-directory.exe
+45 -44
View File
@@ -1,46 +1,47 @@
{ {
"name": "miao-directory-web", "name": "miao-directory-web",
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"dev:host": "vite --host 0.0.0.0", "dev:host": "vite --host 0.0.0.0",
"build": "vue-tsc -b && vite build", "build": "vue-tsc -b && vite build",
"preview": "vite preview" "build:auto": "pnpm run build && rm -rf ./serve/web/* && cp -r ./dist/* ./serve/web/ && cd ./serve && go build && mv ./miao-directory.exe ../",
}, "preview": "vite preview"
"dependencies": { },
"@codemirror/lang-go": "^6.0.1", "dependencies": {
"@codemirror/lang-html": "^6.4.9", "@codemirror/lang-go": "^6.0.1",
"@codemirror/lang-javascript": "^6.2.2", "@codemirror/lang-html": "^6.4.9",
"@codemirror/lang-json": "^6.0.1", "@codemirror/lang-javascript": "^6.2.2",
"@codemirror/lang-markdown": "^6.2.5", "@codemirror/lang-json": "^6.0.1",
"@codemirror/lang-python": "^6.1.6", "@codemirror/lang-markdown": "^6.2.5",
"@codemirror/lang-sass": "^6.0.2", "@codemirror/lang-python": "^6.1.6",
"@codemirror/lang-sql": "^6.7.1", "@codemirror/lang-sass": "^6.0.2",
"@codemirror/lang-vue": "^0.1.3", "@codemirror/lang-sql": "^6.7.1",
"@codemirror/lang-xml": "^6.1.0", "@codemirror/lang-vue": "^0.1.3",
"@codemirror/lang-yaml": "^6.1.1", "@codemirror/lang-xml": "^6.1.0",
"@vicons/ionicons5": "^0.12.0", "@codemirror/lang-yaml": "^6.1.1",
"axios": "^1.7.3", "@vicons/ionicons5": "^0.12.0",
"codemirror": "^6.0.1", "axios": "^1.7.3",
"lodash": "^4.17.21", "codemirror": "^6.0.1",
"naive-ui": "^2.39.0", "lodash": "^4.17.21",
"pdfjs-dist": "^4.5.136", "naive-ui": "^2.39.0",
"sass": "^1.77.8", "pdfjs-dist": "^4.5.136",
"vue": "^3.4.35", "sass": "^1.77.8",
"vue-codemirror": "^6.1.1", "vue": "^3.4.35",
"xgplayer": "^3.0.20", "vue-codemirror": "^6.1.1",
"xgplayer-subtitles": "^3.0.20" "xgplayer": "^3.0.20",
}, "xgplayer-subtitles": "^3.0.20"
"devDependencies": { },
"@types/lodash": "^4.17.7", "devDependencies": {
"@types/node": "^22.1.0", "@types/lodash": "^4.17.7",
"@types/pdfjs-dist": "^2.10.378", "@types/node": "^22.1.0",
"@vitejs/plugin-vue": "^5.1.2", "@types/pdfjs-dist": "^2.10.378",
"typescript": "^5.5.3", "@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.0", "typescript": "^5.5.3",
"vite-plugin-singlefile": "^2.0.2", "vite": "^5.4.0",
"vue-tsc": "^2.0.29" "vite-plugin-singlefile": "^2.0.2",
} "vue-tsc": "^2.0.29"
}
} }
+1 -1
View File
@@ -26,7 +26,7 @@ const rootRef = ref<HTMLDivElement>()
const codeData = ref<string>() const codeData = ref<string>()
// 第一次点击保存时自动备份data,暂时懒得做 // 第一次点击保存时自动备份data,暂时懒得做
const bakData = ref<string>() const bakData = ref<string>()
const extensions = ref<unknown[]>([]) const extensions = ref<any[]>([])
const handleSave = async () => { const handleSave = async () => {
if (bakData.value === codeData.value) { if (bakData.value === codeData.value) {