feat: task增加npm处理、web基础修改

This commit is contained in:
zhouxhere 2025-02-20 18:59:45 +08:00
parent 2e0c9b34d7
commit 5ece3b7f63
4 changed files with 42 additions and 12 deletions

30
.vscode/tasks.json vendored
View File

@ -11,18 +11,34 @@
{ {
"label": "prepare-go", "label": "prepare-go",
"type": "shell", "type": "shell",
"command": "go mod tidy", "command": "go mod tidy"
}, },
{ {
"label": "swaggo-init", "label": "swaggo-init",
"dependsOn": ["prepare-swaggo"],
"type": "shell", "type": "shell",
"command": "swag init --ot json" "command": "swag init --ot json"
}, { },
{
"label": "prepare", "label": "prepare",
"dependsOn":[ "dependsOn": ["prepare-go", "swaggo-init"]
"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"
}
} }
] ]
} }

View File

@ -1,6 +1,3 @@
<template> <template>
<div> <NuxtPage />
<NuxtRouteAnnouncer />
<NuxtWelcome />
</div>
</template> </template>

View File

@ -1,3 +1,9 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
html,
body,
.main {
@apply w-full h-full;
}

View File

@ -2,6 +2,17 @@
export default defineNuxtConfig({ export default defineNuxtConfig({
compatibilityDate: "2024-11-01", compatibilityDate: "2024-11-01",
devtools: { enabled: true }, devtools: { enabled: true },
devServer: {
port: 8888,
},
app: {
head: {
title: "Nuxt.js TypeScript TailwindCSS",
},
rootAttrs: {
class: 'main',
}
},
css: ["@/assets/css/main.css"], css: ["@/assets/css/main.css"],
postcss: { postcss: {
plugins: { plugins: {