From e04310c2c907d94734a2fa8827a3bc15d8025e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 12 Nov 2025 09:50:18 +0800 Subject: [PATCH] style(devcontainer): format JSON configuration and add reference link --- .devcontainer/devcontainer.json | 34 ++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index acf84ac..d0b9cc6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,14 +2,23 @@ * 一些参考链接: * https://containers.dev/implementors/json_reference/#variables-in-devcontainerjson * https://code.claude.com/docs/zh-CN/devcontainer + * https://github.com/Kilo-Org/kilocode/blob/main/cli/Dockerfile */ - { "name": "SBX", - "forwardPorts": [4730, 4731], // vscode://settings/remote.localPortHost -> 默认只监听 localhost + "forwardPorts": [ + 4730, + 4731 + ], // vscode://settings/remote.localPortHost -> 默认只监听 localhost "portsAttributes": { - "4730": { "label": "开发服务器端口", "onAutoForward": "notify" }, - "4731": { "label": "预览服务器端口", "onAutoForward": "notify" } + "4730": { + "label": "开发服务器端口", + "onAutoForward": "notify" + }, + "4731": { + "label": "预览服务器端口", + "onAutoForward": "notify" + } }, "build": { "dockerfile": "Dockerfile", @@ -38,7 +47,6 @@ "google.gemini-cli-vscode-ide-companion", "kilocode.kilo-code", "alibaba-cloud.tongyi-lingma", - // >>>>> "vue.volar", "lokalise.i18n-ally", @@ -46,7 +54,6 @@ "vitest.explorer", "antfu.unocss", // <<<<< - // 代码质量 / 格式化 / Lint "editorconfig.editorconfig", "dbaeumer.vscode-eslint", @@ -62,10 +69,16 @@ }, "terminal.integrated.defaultProfile.linux": "zsh", "terminal.integrated.profiles.linux": { - "🐚bash": { "path": "bash", "icon": "terminal-bash" }, - "💲zsh": { "path": "zsh", "icon": "terminal-cmd", "overrideName": true } + "🐚bash": { + "path": "bash", + "icon": "terminal-bash" + }, + "💲zsh": { + "path": "zsh", + "icon": "terminal-cmd", + "overrideName": true + } }, - // https://stackoverflow.com/questions/75708866/vscode-dev-container-fails-to-load-ms-vscode-js-debug-extension-correctly // https://davidwesst.com/blog/missing-bootloader-in-vscode-devcontainer/ /** @@ -101,7 +114,6 @@ "source=${localWorkspaceFolderBasename}---pnpm-store,target=/home/usr_vscode/.pnpm-store,type=volume", "source=${localWorkspaceFolderBasename}---node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume" ], - /** * 执行顺序总结 1. initializeCommand (本地主机) @@ -132,4 +144,4 @@ "waitFor": "updateContentCommand", "workspaceMount": "source=${localWorkspaceFolder},target=/${localWorkspaceFolderBasename},type=bind,consistency=delegated", "workspaceFolder": "/${localWorkspaceFolderBasename}" -} +} \ No newline at end of file