Compare commits
17 Commits
dee38fbae8
...
renovate/s
| Author | SHA1 | Date | |
|---|---|---|---|
| aa67399422 | |||
| 4507a5a7d0 | |||
| 17730cfb10 | |||
| c4b93140f0 | |||
| 1a9257249f | |||
|
|
66280dc6a1 | ||
| 16c93a82a2 | |||
| 16d4b3f749 | |||
| 42f63f7134 | |||
| 9d12927793 | |||
| bb82a6ab83 | |||
| 76d2a45015 | |||
|
|
935251ee53 | ||
| 5472f1c9b9 | |||
| 744703811a | |||
| be3d59691b | |||
| f6bccd7536 |
@@ -1,65 +1,31 @@
|
||||
{
|
||||
"image": "ghcr.io/yanhao98/h-devcontainer:main",
|
||||
"runArgs": ["--name=${localWorkspaceFolderBasename}-devcontainer"],
|
||||
"forwardPorts": [4730, 4731], // vscode://settings/remote.localPortHost -> 默认只监听 localhost
|
||||
"runArgs": [
|
||||
"--hostname=devcontainer-host",
|
||||
"--name=${localWorkspaceFolderBasename}-devcontainer"
|
||||
],
|
||||
"forwardPorts": [4730, 4731, 5901],
|
||||
"portsAttributes": {
|
||||
"4730": { "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": {
|
||||
"NODE_OPTIONS": "--max-old-space-size=4096",
|
||||
"TZ": "${localEnv:TZ:Asia/Shanghai}"
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"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"
|
||||
],
|
||||
"extensions": ["prettier.prettier-vscode", "vue.volar"],
|
||||
"settings": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.codeActionsOnSave": {
|
||||
"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"
|
||||
// "tasks": { "version": "2.0.0", "tasks": [] },
|
||||
"github.copilot.chat.codeGeneration.instructions": [
|
||||
{
|
||||
"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."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
// 不挂载还可能会遇到:`Cannot run macOS (Mach-O) executable in Docker: Exec format error`
|
||||
"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"
|
||||
],
|
||||
@@ -69,7 +35,5 @@
|
||||
"updateContentCommand": "/usr/local/bin/run-lifecycle-scripts.sh updateContentCommand",
|
||||
"postCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh postCreateCommand",
|
||||
"postStartCommand": "/usr/local/bin/run-lifecycle-scripts.sh postStartCommand",
|
||||
"postAttachCommand": "/usr/local/bin/run-lifecycle-scripts.sh postAttachCommand",
|
||||
"waitFor": "updateContentCommand",
|
||||
"remoteUser": "usr_vscode"
|
||||
"postAttachCommand": "/usr/local/bin/run-lifecycle-scripts.sh postAttachCommand"
|
||||
}
|
||||
|
||||
0
.devcontainer/lifecycle-scripts.d/.gitkeep
Normal file
0
.devcontainer/lifecycle-scripts.d/.gitkeep
Normal file
@@ -1,13 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/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
|
||||
14
.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/-
Executable file
14
.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/-
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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",
|
||||
"EditorConfig.EditorConfig",
|
||||
"oxc.oxc-vscode",
|
||||
"esbenp.prettier-vscode",
|
||||
"prettier.prettier-vscode",
|
||||
"stylelint.vscode-stylelint",
|
||||
"lokalise.i18n-ally"
|
||||
]
|
||||
|
||||
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
@@ -32,18 +32,18 @@
|
||||
"scss.lint.unknownAtRules": "ignore",
|
||||
"css.lint.unknownAtRules": "ignore",
|
||||
"less.lint.unknownAtRules": "ignore",
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode",
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
},
|
||||
|
||||
// ============================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"extends": "@tsconfig/node22/tsconfig.json",
|
||||
"extends": "@tsconfig/node24/tsconfig.json",
|
||||
"include": ["./**/*"]
|
||||
}
|
||||
|
||||
10
package.json
10
package.json
@@ -57,7 +57,7 @@
|
||||
"@commitlint/cli": "^20.1.0",
|
||||
"@commitlint/config-conventional": "^20.0.0",
|
||||
"@formkit/auto-animate": "^0.9.0",
|
||||
"@pinia/colada": "^0.18.0",
|
||||
"@pinia/colada": "^0.21.0",
|
||||
"@primeuix/themes": "^2.0.0",
|
||||
"@sa/materials": "workspace:*",
|
||||
"@unhead/vue": "^2.0.19",
|
||||
@@ -93,7 +93,7 @@
|
||||
"@stylelint-types/stylelint-order": "^7.0.0",
|
||||
"@stylelint-types/stylelint-scss": "^6.11.0",
|
||||
"@stylistic/eslint-plugin": "^5.6.1",
|
||||
"@tsconfig/node22": "^22.0.5",
|
||||
"@tsconfig/node24": "^24.0.0",
|
||||
"@types/html-minifier-terser": "^7.0.2",
|
||||
"@types/jsdom": "^27.0.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
@@ -112,7 +112,7 @@
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jsonc": "^2.21.0",
|
||||
"eslint-plugin-oxlint": "~1.32.0",
|
||||
"eslint-plugin-perfectionist": "^4.15.1",
|
||||
"eslint-plugin-perfectionist": "^5.0.0",
|
||||
"eslint-plugin-playwright": "^2.3.0",
|
||||
"eslint-plugin-vue": "~10.6.0",
|
||||
"happy-dom": "^20.0.10",
|
||||
@@ -125,13 +125,13 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"oxlint": "~1.29.0",
|
||||
"postcss-html": "^1.8.0",
|
||||
"prettier": "3.7.4",
|
||||
"prettier": "3.8.0",
|
||||
"rollup": "^4.53.3",
|
||||
"sass-embedded": "^1.93.3",
|
||||
"sharp": "^0.34.5",
|
||||
"stylelint": "^16.26.0",
|
||||
"stylelint-config-recess-order": "^7.4.0",
|
||||
"stylelint-config-standard": "^39.0.1",
|
||||
"stylelint-config-standard": "^40.0.0",
|
||||
"stylelint-config-standard-scss": "^16.0.0",
|
||||
"stylelint-config-standard-vue": "^1.0.0",
|
||||
"stylelint-define-config": "^16.24.0",
|
||||
|
||||
647
pnpm-lock.yaml
generated
647
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "@tsconfig/node22/tsconfig.json",
|
||||
"extends": "@tsconfig/node24/tsconfig.json",
|
||||
"include": [
|
||||
"vite.config.*",
|
||||
"vitest.config.*",
|
||||
|
||||
Reference in New Issue
Block a user