Compare commits
13 Commits
552fa2b827
...
renovate/s
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c238142b9 | |||
| 4507a5a7d0 | |||
| 17730cfb10 | |||
| c4b93140f0 | |||
| 1a9257249f | |||
|
|
66280dc6a1 | ||
| 16c93a82a2 | |||
| 16d4b3f749 | |||
| 42f63f7134 | |||
| 9d12927793 | |||
| bb82a6ab83 | |||
| 76d2a45015 | |||
|
|
935251ee53 |
@@ -1,65 +1,31 @@
|
|||||||
{
|
{
|
||||||
"image": "ghcr.io/yanhao98/h-devcontainer:main",
|
"image": "ghcr.io/yanhao98/h-devcontainer:main",
|
||||||
"runArgs": ["--name=${localWorkspaceFolderBasename}-devcontainer"],
|
"runArgs": [
|
||||||
"forwardPorts": [4730, 4731], // vscode://settings/remote.localPortHost -> 默认只监听 localhost
|
"--hostname=devcontainer-host",
|
||||||
|
"--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": [
|
"extensions": ["prettier.prettier-vscode", "vue.volar"],
|
||||||
// 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": {
|
||||||
"editor.formatOnSave": true,
|
// "tasks": { "version": "2.0.0", "tasks": [] },
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"github.copilot.chat.codeGeneration.instructions": [
|
||||||
"editor.codeActionsOnSave": {
|
{
|
||||||
"source.fixAll.eslint": "explicit"
|
"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."
|
||||||
},
|
}
|
||||||
"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"
|
||||||
],
|
],
|
||||||
@@ -69,7 +35,5 @@
|
|||||||
"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"
|
|
||||||
}
|
}
|
||||||
|
|||||||
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",
|
"dbaeumer.vscode-eslint",
|
||||||
"EditorConfig.EditorConfig",
|
"EditorConfig.EditorConfig",
|
||||||
"oxc.oxc-vscode",
|
"oxc.oxc-vscode",
|
||||||
"esbenp.prettier-vscode",
|
"prettier.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": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "prettier.prettier-vscode",
|
||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[vue]": {
|
"[vue]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[json]": {
|
"[json]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[jsonc]": {
|
"[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": ["./**/*"]
|
"include": ["./**/*"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.18.0",
|
"@pinia/colada": "^0.21.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/node22": "^22.0.5",
|
"@tsconfig/node24": "^24.0.0",
|
||||||
"@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",
|
||||||
@@ -125,14 +125,14 @@
|
|||||||
"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.7.4",
|
"prettier": "3.8.0",
|
||||||
"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",
|
||||||
"stylelint": "^16.26.0",
|
"stylelint": "^16.26.0",
|
||||||
"stylelint-config-recess-order": "^7.4.0",
|
"stylelint-config-recess-order": "^7.4.0",
|
||||||
"stylelint-config-standard": "^39.0.1",
|
"stylelint-config-standard": "^39.0.1",
|
||||||
"stylelint-config-standard-scss": "^16.0.0",
|
"stylelint-config-standard-scss": "^17.0.0",
|
||||||
"stylelint-config-standard-vue": "^1.0.0",
|
"stylelint-config-standard-vue": "^1.0.0",
|
||||||
"stylelint-define-config": "^16.24.0",
|
"stylelint-define-config": "^16.24.0",
|
||||||
"svgo": "^4.0.0",
|
"svgo": "^4.0.0",
|
||||||
|
|||||||
461
pnpm-lock.yaml
generated
461
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": [
|
"include": [
|
||||||
"vite.config.*",
|
"vite.config.*",
|
||||||
"vitest.config.*",
|
"vitest.config.*",
|
||||||
|
|||||||
Reference in New Issue
Block a user