diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 21ba7de..609a360 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,3 +1,4 @@ +# docker build -t my-dev-container . FROM debian:13.1-slim # 元数据 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 779d3f3..1e663cc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,23 +6,8 @@ */ { "name": "SBX", - "forwardPorts": [4730, 4731], // vscode://settings/remote.localPortHost -> 默认只监听 localhost - "portsAttributes": { - "4730": { - "label": "开发服务器端口", - "onAutoForward": "notify" - }, - "4731": { - "label": "预览服务器端口", - "onAutoForward": "notify" - } - }, - "build": { - "dockerfile": "Dockerfile", - "args": { - // - } - }, + "image": "my-dev-container", + // "build": { "dockerfile": "Dockerfile", "args": {} }, "runArgs": [ // ----- // "--network=host", @@ -36,22 +21,29 @@ "--add-host=host.docker.internal:host-gateway", "--name=${localWorkspaceFolderBasename}-devcontainer" ], + "forwardPorts": [4730, 4731], // vscode://settings/remote.localPortHost -> 默认只监听 localhost + "portsAttributes": { + "4730": { "label": "开发服务器端口", "onAutoForward": "openPreview" }, + "4731": { "label": "预览服务器端口", "onAutoForward": "notify" } + }, "customizations": { "vscode": { "extensions": [ // AI + "github.copilot", + "github.copilot-chat", + "vicanent.gcmp", "anthropic.claude-code", "google.gemini-cli-vscode-ide-companion", "kilocode.kilo-code", "alibaba-cloud.tongyi-lingma", // >>>>> - "vue.volar", - "lokalise.i18n-ally", + "gruntfuggly.todo-tree", "eamodio.gitlens", + "lokalise.i18n-ally", "vitest.explorer", "antfu.unocss", - "vicanent.gcmp", - "gruntfuggly.todo-tree", + "vue.volar", // <<<<< // 代码质量 / 格式化 / Lint "editorconfig.editorconfig", @@ -67,17 +59,10 @@ { "type": "npm", "script": "dev", - "label": "🚀 dev-in-container", + "label": "🚀 Dev: Run on Folder Open", "detail": "启动开发服务器", "runOptions": { "runOn": "folderOpen" }, - "problemMatcher": { - "pattern": { "regexp": "." }, - "background": { - "activeOnStart": true, - "beginsPattern": "VITE.*ready in", - "endsPattern": "(Local|Network):.*http" - } - }, + "problemMatcher": [], "isBackground": true, "presentation": { "reveal": "always", "panel": "dedicated" }, "group": { "kind": "build", "isDefault": false } @@ -89,16 +74,13 @@ "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }, - "terminal.integrated.defaultProfile.linux": "zsh", + "terminal.integrated.defaultProfile.linux": "💲zsh", "terminal.integrated.profiles.linux": { - "🐚bash": { - "path": "bash", - "icon": "terminal-bash" - }, "💲zsh": { "path": "zsh", "icon": "terminal-cmd", - "overrideName": true + "overrideName": true, + "color": "terminal.ansiGreen" } }, // https://stackoverflow.com/questions/75708866/vscode-dev-container-fails-to-load-ms-vscode-js-debug-extension-correctly diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ff4784d..31725e1 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -6,16 +6,12 @@ "script": "dev", "label": "🚀 dev", "detail": "启动开发服务器", - "problemMatcher": { - "pattern": { "regexp": "." }, - "background": { - "activeOnStart": true, - "beginsPattern": "VITE.*ready in", - "endsPattern": "(Local|Network):.*http" - } - }, + "problemMatcher": [], "isBackground": true, - "presentation": { "reveal": "always", "panel": "dedicated" }, + "presentation": { + "reveal": "always", // 控制运行任务的终端是否显示。可按选项 "revealProblems" 进行替代。默认设置为“始终”。 + "panel": "dedicated" // dedicated:一个任务独占一个终端,方便查看特定任务的日志,不会被其他任务干扰。 + }, "group": { "kind": "build", "isDefault": false } }, { @@ -23,7 +19,6 @@ "script": "build-only", "label": "🔨 build-only", "detail": "" /* 如果为空或省略,VSCode 将自动使用 package.json 中 scripts[scriptName] 的值作为 detail */, - "problemMatcher": ["$tsc"], "presentation": { "reveal": "always", "panel": "shared" }, "group": { "kind": "none", "isDefault": false } }, @@ -33,14 +28,7 @@ "label": "☁️ wrangler:dev", "detail": "启动 Cloudflare Workers 开发服务器,相当于预览", "dependsOn": ["🔨 build-only"], - "problemMatcher": { - "pattern": { "regexp": "." }, - "background": { - "activeOnStart": true, - "beginsPattern": "wrangler dev", - "endsPattern": "Ready on" - } - }, + "problemMatcher": [], "isBackground": true, "presentation": { "reveal": "always", "panel": "dedicated" }, "group": { "kind": "build", "isDefault": false }