style(devcontainer): format JSON configuration and add reference link

This commit is contained in:
严浩
2025-11-12 09:50:18 +08:00
parent d2a21581ff
commit e04310c2c9

View File

@@ -2,14 +2,23 @@
* *
* https://containers.dev/implementors/json_reference/#variables-in-devcontainerjson * https://containers.dev/implementors/json_reference/#variables-in-devcontainerjson
* https://code.claude.com/docs/zh-CN/devcontainer * https://code.claude.com/docs/zh-CN/devcontainer
* https://github.com/Kilo-Org/kilocode/blob/main/cli/Dockerfile
*/ */
{ {
"name": "SBX", "name": "SBX",
"forwardPorts": [4730, 4731], // vscode://settings/remote.localPortHost -> 默认只监听 localhost "forwardPorts": [
4730,
4731
], // vscode://settings/remote.localPortHost -> 默认只监听 localhost
"portsAttributes": { "portsAttributes": {
"4730": { "label": "开发服务器端口", "onAutoForward": "notify" }, "4730": {
"4731": { "label": "预览服务器端口", "onAutoForward": "notify" } "label": "开发服务器端口",
"onAutoForward": "notify"
},
"4731": {
"label": "预览服务器端口",
"onAutoForward": "notify"
}
}, },
"build": { "build": {
"dockerfile": "Dockerfile", "dockerfile": "Dockerfile",
@@ -38,7 +47,6 @@
"google.gemini-cli-vscode-ide-companion", "google.gemini-cli-vscode-ide-companion",
"kilocode.kilo-code", "kilocode.kilo-code",
"alibaba-cloud.tongyi-lingma", "alibaba-cloud.tongyi-lingma",
// >>>>> // >>>>>
"vue.volar", "vue.volar",
"lokalise.i18n-ally", "lokalise.i18n-ally",
@@ -46,7 +54,6 @@
"vitest.explorer", "vitest.explorer",
"antfu.unocss", "antfu.unocss",
// <<<<< // <<<<<
// 代码质量 / 格式化 / Lint // 代码质量 / 格式化 / Lint
"editorconfig.editorconfig", "editorconfig.editorconfig",
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
@@ -62,10 +69,16 @@
}, },
"terminal.integrated.defaultProfile.linux": "zsh", "terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": { "terminal.integrated.profiles.linux": {
"🐚bash": { "path": "bash", "icon": "terminal-bash" }, "🐚bash": {
"💲zsh": { "path": "zsh", "icon": "terminal-cmd", "overrideName": true } "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://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/ // 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}---pnpm-store,target=/home/usr_vscode/.pnpm-store,type=volume",
"source=${localWorkspaceFolderBasename}---node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume" "source=${localWorkspaceFolderBasename}---node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume"
], ],
/** /**
* *
1. initializeCommand () 1. initializeCommand ()