Compare commits
1 Commits
renovate/m
...
75cac06143
| Author | SHA1 | Date | |
|---|---|---|---|
| 75cac06143 |
@@ -1,31 +1,65 @@
|
|||||||
{
|
{
|
||||||
"image": "ghcr.io/yanhao98/h-devcontainer:main",
|
"image": "ghcr.io/yanhao98/h-devcontainer:main",
|
||||||
"runArgs": [
|
"runArgs": ["--name=${localWorkspaceFolderBasename}-devcontainer"],
|
||||||
"--hostname=devcontainer-host",
|
"forwardPorts": [4730, 4731], // vscode://settings/remote.localPortHost -> 默认只监听 localhost
|
||||||
"--name=${localWorkspaceFolderBasename}-devcontainer"
|
|
||||||
],
|
|
||||||
"forwardPorts": [4730, 4731, 5901],
|
|
||||||
"portsAttributes": {
|
"portsAttributes": {
|
||||||
"4730": { "label": "开发服务器端口", "onAutoForward": "notify" },
|
"4730": { "label": "开发服务器端口", "onAutoForward": "notify" },
|
||||||
"4731": { "label": "预览服务器端口", "onAutoForward": "notify" }
|
"4731": { "label": "预览服务器端口", "onAutoForward": "notify" }
|
||||||
},
|
},
|
||||||
|
"remoteEnv": {
|
||||||
|
"ANTHROPIC_AUTH_TOKEN": "${localEnv:ANTHROPIC_AUTH_TOKEN}",
|
||||||
|
"ANTHROPIC_BASE_URL": "${localEnv:ANTHROPIC_BASE_URL}",
|
||||||
|
"GEMINI_API_KEY": "${localEnv:GEMINI_API_KEY}",
|
||||||
|
"GOOGLE_GEMINI_BASE_URL": "${localEnv:GOOGLE_GEMINI_BASE_URL}"
|
||||||
|
},
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
|
"NODE_OPTIONS": "--max-old-space-size=4096",
|
||||||
"TZ": "${localEnv:TZ:Asia/Shanghai}"
|
"TZ": "${localEnv:TZ:Asia/Shanghai}"
|
||||||
},
|
},
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": ["prettier.prettier-vscode", "vue.volar"],
|
"extensions": [
|
||||||
|
// AI
|
||||||
|
"github.copilot-chat",
|
||||||
|
"anthropic.claude-code",
|
||||||
|
"google.gemini-cli-vscode-ide-companion",
|
||||||
|
"vicanent.gcmp",
|
||||||
|
// >>>>>
|
||||||
|
// "eamodio.gitlens",
|
||||||
|
"tu6ge.naive-ui-intelligence",
|
||||||
|
"gruntfuggly.todo-tree",
|
||||||
|
"lokalise.i18n-ally",
|
||||||
|
"vitest.explorer",
|
||||||
|
"antfu.unocss",
|
||||||
|
"vue.volar",
|
||||||
|
// <<<<<
|
||||||
|
// 代码质量 / 格式化 / Lint
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"stylelint.vscode-stylelint",
|
||||||
|
"oxc.oxc-vscode",
|
||||||
|
"esbenp.prettier-vscode"
|
||||||
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
// "tasks": { "version": "2.0.0", "tasks": [] },
|
"editor.formatOnSave": true,
|
||||||
"github.copilot.chat.codeGeneration.instructions": [
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
{
|
"editor.codeActionsOnSave": {
|
||||||
"text": "This dev container includes a lightweight Fluxbox based desktop that can be accessed using a VNC viewer or the web. GUI-based commands executed from the built-in VS Code terminal will open on the desktop automatically."
|
"source.fixAll.eslint": "explicit"
|
||||||
}
|
},
|
||||||
]
|
"chat.extensionUnification.enabled": true,
|
||||||
|
"chat.tools.terminal.autoApprove": {
|
||||||
|
"/.*/": true,
|
||||||
|
"git push": false
|
||||||
|
},
|
||||||
|
// * 尽管使用了“/.*/”,但有些还是会失败,因为有几个错误的默认值:
|
||||||
|
// * https://github.com/microsoft/vscode/issues/266651#issuecomment-3292581459
|
||||||
|
"chat.tools.terminal.ignoreDefaultAutoApproveRules": true,
|
||||||
|
"tasks": { "version": "2.0.0", "tasks": [] },
|
||||||
|
"terminal.integrated.defaultProfile.linux": "zsh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mounts": [
|
"mounts": [
|
||||||
|
// 不挂载还可能会遇到:`Cannot run macOS (Mach-O) executable in Docker: Exec format error`
|
||||||
"source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume",
|
"source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume",
|
||||||
"source=${localWorkspaceFolder}/.devcontainer/lifecycle-scripts.d,target=/usr/local/etc/lifecycle-scripts.d,type=bind,consistency=delegated"
|
"source=${localWorkspaceFolder}/.devcontainer/lifecycle-scripts.d,target=/usr/local/etc/lifecycle-scripts.d,type=bind,consistency=delegated"
|
||||||
],
|
],
|
||||||
@@ -35,5 +69,7 @@
|
|||||||
"updateContentCommand": "/usr/local/bin/run-lifecycle-scripts.sh updateContentCommand",
|
"updateContentCommand": "/usr/local/bin/run-lifecycle-scripts.sh updateContentCommand",
|
||||||
"postCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh postCreateCommand",
|
"postCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh postCreateCommand",
|
||||||
"postStartCommand": "/usr/local/bin/run-lifecycle-scripts.sh postStartCommand",
|
"postStartCommand": "/usr/local/bin/run-lifecycle-scripts.sh postStartCommand",
|
||||||
"postAttachCommand": "/usr/local/bin/run-lifecycle-scripts.sh postAttachCommand"
|
"postAttachCommand": "/usr/local/bin/run-lifecycle-scripts.sh postAttachCommand",
|
||||||
|
"waitFor": "updateContentCommand",
|
||||||
|
"remoteUser": "usr_vscode"
|
||||||
}
|
}
|
||||||
|
|||||||
13
.devcontainer/lifecycle-scripts.d/01-onCreateCommand.d/00-setup-container
Executable file
13
.devcontainer/lifecycle-scripts.d/01-onCreateCommand.d/00-setup-container
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/zsh -eu
|
||||||
|
# 打印带有颜色的欢迎信息
|
||||||
|
echo -e "\033[1;32m↘️ 容器首次创建!\033[0m"
|
||||||
|
|
||||||
|
# 修复权限问题(比如 node_modules 目录)
|
||||||
|
sudo chown -R $(whoami):$(whoami) /workspaces || true
|
||||||
|
|
||||||
|
# 调用内置命令 (这些命令在 _build-context/builtin-scripts 目录中的脚本中定义)
|
||||||
|
h-setup-locale
|
||||||
|
h-setup-zsh
|
||||||
|
|
||||||
|
h-setup-bun-bin
|
||||||
|
h-setup-pnpm-bin
|
||||||
13
.devcontainer/lifecycle-scripts.d/02-updateContentCommand.d/00-pnpm-install
Executable file
13
.devcontainer/lifecycle-scripts.d/02-updateContentCommand.d/00-pnpm-install
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash -eu
|
||||||
|
# 容器内容更新时的消息和依赖安装
|
||||||
|
|
||||||
|
echo '↘️ 容器内容已更新!'
|
||||||
|
|
||||||
|
# 安装依赖
|
||||||
|
if command -v pnpm >/dev/null 2>&1; then
|
||||||
|
# 跳过: The modules directory at "/workspaces/h-devcontainers/node_modules" will be removed and reinstalled from scratch. Proceed? (Y/n) ·
|
||||||
|
time pnpm install --config.confirmModulesPurge=false
|
||||||
|
else
|
||||||
|
echo '❌错误: pnpm 未安装'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/zsh -eu
|
|
||||||
h-setup-zh-locale
|
|
||||||
|
|
||||||
h-setup-bun-bin
|
|
||||||
h-setup-pnpm-bin
|
|
||||||
|
|
||||||
h-setup-chromium
|
|
||||||
h-setup-desktop-lite
|
|
||||||
|
|
||||||
h-install-node-modules
|
|
||||||
|
|
||||||
echo "-----------------------------"
|
|
||||||
echo "开发容器已启动并配置完成!"
|
|
||||||
echo "-----------------------------"
|
|
||||||
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@@ -5,7 +5,7 @@
|
|||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"EditorConfig.EditorConfig",
|
"EditorConfig.EditorConfig",
|
||||||
"oxc.oxc-vscode",
|
"oxc.oxc-vscode",
|
||||||
"prettier.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
"stylelint.vscode-stylelint",
|
"stylelint.vscode-stylelint",
|
||||||
"lokalise.i18n-ally"
|
"lokalise.i18n-ally"
|
||||||
]
|
]
|
||||||
|
|||||||
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
@@ -32,18 +32,18 @@
|
|||||||
"scss.lint.unknownAtRules": "ignore",
|
"scss.lint.unknownAtRules": "ignore",
|
||||||
"css.lint.unknownAtRules": "ignore",
|
"css.lint.unknownAtRules": "ignore",
|
||||||
"less.lint.unknownAtRules": "ignore",
|
"less.lint.unknownAtRules": "ignore",
|
||||||
"editor.defaultFormatter": "prettier.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[vue]": {
|
"[vue]": {
|
||||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[json]": {
|
"[json]": {
|
||||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[jsonc]": {
|
"[jsonc]": {
|
||||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "@tsconfig/node24/tsconfig.json",
|
"extends": "@tsconfig/node22/tsconfig.json",
|
||||||
"include": ["./**/*"]
|
"include": ["./**/*"]
|
||||||
}
|
}
|
||||||
|
|||||||
14
package.json
14
package.json
@@ -57,7 +57,7 @@
|
|||||||
"@commitlint/cli": "^20.1.0",
|
"@commitlint/cli": "^20.1.0",
|
||||||
"@commitlint/config-conventional": "^20.0.0",
|
"@commitlint/config-conventional": "^20.0.0",
|
||||||
"@formkit/auto-animate": "^0.9.0",
|
"@formkit/auto-animate": "^0.9.0",
|
||||||
"@pinia/colada": "^0.21.0",
|
"@pinia/colada": "^0.18.0",
|
||||||
"@primeuix/themes": "^2.0.0",
|
"@primeuix/themes": "^2.0.0",
|
||||||
"@sa/materials": "workspace:*",
|
"@sa/materials": "workspace:*",
|
||||||
"@unhead/vue": "^2.0.19",
|
"@unhead/vue": "^2.0.19",
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
"@stylelint-types/stylelint-order": "^7.0.0",
|
"@stylelint-types/stylelint-order": "^7.0.0",
|
||||||
"@stylelint-types/stylelint-scss": "^6.11.0",
|
"@stylelint-types/stylelint-scss": "^6.11.0",
|
||||||
"@stylistic/eslint-plugin": "^5.6.1",
|
"@stylistic/eslint-plugin": "^5.6.1",
|
||||||
"@tsconfig/node24": "^24.0.0",
|
"@tsconfig/node22": "^22.0.5",
|
||||||
"@types/html-minifier-terser": "^7.0.2",
|
"@types/html-minifier-terser": "^7.0.2",
|
||||||
"@types/jsdom": "^27.0.0",
|
"@types/jsdom": "^27.0.0",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
"eslint-plugin-import": "^2.32.0",
|
"eslint-plugin-import": "^2.32.0",
|
||||||
"eslint-plugin-jsonc": "^2.21.0",
|
"eslint-plugin-jsonc": "^2.21.0",
|
||||||
"eslint-plugin-oxlint": "~1.32.0",
|
"eslint-plugin-oxlint": "~1.32.0",
|
||||||
"eslint-plugin-perfectionist": "^5.0.0",
|
"eslint-plugin-perfectionist": "^4.15.1",
|
||||||
"eslint-plugin-playwright": "^2.3.0",
|
"eslint-plugin-playwright": "^2.3.0",
|
||||||
"eslint-plugin-vue": "~10.6.0",
|
"eslint-plugin-vue": "~10.6.0",
|
||||||
"happy-dom": "^20.0.10",
|
"happy-dom": "^20.0.10",
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"oxlint": "~1.29.0",
|
"oxlint": "~1.29.0",
|
||||||
"postcss-html": "^1.8.0",
|
"postcss-html": "^1.8.0",
|
||||||
"prettier": "3.8.0",
|
"prettier": "3.7.4",
|
||||||
"rollup": "^4.53.3",
|
"rollup": "^4.53.3",
|
||||||
"sass-embedded": "^1.93.3",
|
"sass-embedded": "^1.93.3",
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
@@ -141,9 +141,9 @@
|
|||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"unocss": "^66.5.9",
|
"unocss": "^66.5.9",
|
||||||
"unocss-preset-animations": "^1.3.0",
|
"unocss-preset-animations": "^1.3.0",
|
||||||
"unplugin-auto-import": "^21.0.0",
|
"unplugin-auto-import": "^20.2.0",
|
||||||
"unplugin-icons": "^23.0.0",
|
"unplugin-icons": "^22.5.0",
|
||||||
"unplugin-vue-components": "^31.0.0",
|
"unplugin-vue-components": "^30.0.0",
|
||||||
"unplugin-vue-markdown": "^29.2.0",
|
"unplugin-vue-markdown": "^29.2.0",
|
||||||
"unplugin-vue-router": "^0.19.0",
|
"unplugin-vue-router": "^0.19.0",
|
||||||
"vite": "^7.2.4",
|
"vite": "^7.2.4",
|
||||||
|
|||||||
1310
pnpm-lock.yaml
generated
1310
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "@tsconfig/node24/tsconfig.json",
|
"extends": "@tsconfig/node22/tsconfig.json",
|
||||||
"include": [
|
"include": [
|
||||||
"vite.config.*",
|
"vite.config.*",
|
||||||
"vitest.config.*",
|
"vitest.config.*",
|
||||||
|
|||||||
Reference in New Issue
Block a user