chore(devcontainer): update configuration and lifecycle scripts
This commit is contained in:
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
|
||||
17
.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/-
Executable file
17
.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/-
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/zsh -eu
|
||||
h-setup-zh-locale
|
||||
|
||||
h-setup-bun-bin
|
||||
h-setup-pnpm-bin
|
||||
|
||||
h-setup-ai-claude-code --config
|
||||
h-setup-ai-gemini-cli --config
|
||||
|
||||
h-setup-chromium
|
||||
h-setup-desktop-lite
|
||||
|
||||
h-install-node-modules
|
||||
|
||||
echo "-----------------------------"
|
||||
echo "开发容器已启动并配置完成!"
|
||||
echo "-----------------------------"
|
||||
Reference in New Issue
Block a user