From 5ece3b7f633d7e1aaafb0447015aff4117d1b1a1 Mon Sep 17 00:00:00 2001 From: zhouxhere Date: Thu, 20 Feb 2025 18:59:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20task=E5=A2=9E=E5=8A=A0npm=E5=A4=84?= =?UTF-8?q?=E7=90=86=E3=80=81web=E5=9F=BA=E7=A1=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/tasks.json | 30 +++++++++++++++++++++++------- web/app.vue | 5 +---- web/assets/css/main.css | 8 +++++++- web/nuxt.config.ts | 11 +++++++++++ 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6da8c08..68866e8 100755 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -11,18 +11,34 @@ { "label": "prepare-go", "type": "shell", - "command": "go mod tidy", + "command": "go mod tidy" }, { "label": "swaggo-init", + "dependsOn": ["prepare-swaggo"], "type": "shell", "command": "swag init --ot json" - }, { + }, + { "label": "prepare", - "dependsOn":[ - "prepare-go", - "swaggo-init", - ] + "dependsOn": ["prepare-go", "swaggo-init"] + }, + { + "label": "prepare-node", + "type": "shell", + "command": "npm install", + "options": { + "cwd": "${workspaceFolder}/web" + } + }, + { + "label": "prepare-web", + "dependsOn": ["prepare-node"], + "type": "shell", + "command": "npm run dev", + "options": { + "cwd": "${workspaceFolder}/web" + } } ] -} \ No newline at end of file +} diff --git a/web/app.vue b/web/app.vue index 09f935b..8f62b8b 100755 --- a/web/app.vue +++ b/web/app.vue @@ -1,6 +1,3 @@ diff --git a/web/assets/css/main.css b/web/assets/css/main.css index bd6213e..7070f03 100644 --- a/web/assets/css/main.css +++ b/web/assets/css/main.css @@ -1,3 +1,9 @@ @tailwind base; @tailwind components; -@tailwind utilities; \ No newline at end of file +@tailwind utilities; + +html, +body, +.main { + @apply w-full h-full; +} \ No newline at end of file diff --git a/web/nuxt.config.ts b/web/nuxt.config.ts index f21fb60..554a0bb 100755 --- a/web/nuxt.config.ts +++ b/web/nuxt.config.ts @@ -2,6 +2,17 @@ export default defineNuxtConfig({ compatibilityDate: "2024-11-01", devtools: { enabled: true }, + devServer: { + port: 8888, + }, + app: { + head: { + title: "Nuxt.js TypeScript TailwindCSS", + }, + rootAttrs: { + class: 'main', + } + }, css: ["@/assets/css/main.css"], postcss: { plugins: {