Loading...
Loading...
Compare original and translation side by side
flowchart TB
start([User requests devcontainer])
recon[1. Project Reconnaissance]
detect[2. Detect Languages]
generate[3. Generate Configuration]
write[4. Write files to .devcontainer/]
done([Done])
start --> recon
recon --> detect
detect --> generate
generate --> write
write --> doneflowchart TB
start([User requests devcontainer])
recon[1. Project Reconnaissance]
detect[2. Detect Languages]
generate[3. Generate Configuration]
write[4. Write files to .devcontainer/]
done([Done])
start --> recon
recon --> detect
detect --> generate
generate --> write
write --> donepackage.jsonnamepyproject.tomlproject.nameCargo.tomlpackage.namego.mod/package.jsonnamepyproject.tomlproject.nameCargo.tomlpackage.namego.mod/| Language | Detection Files |
|---|---|
| Python | |
| Node/TypeScript | |
| Rust | |
| Go | |
| 语言 | 检测文件 |
|---|---|
| Python | |
| Node/TypeScript | |
| Rust | |
| Go | |
postCreateCommanduv run /opt/post_install.py && uv sync && npm cipostCreateCommanduv run /opt/post_install.py && uv sync && npm ciresources/{{PROJECT_NAME}}{{PROJECT_SLUG}}resources/{{PROJECT_NAME}}{{PROJECT_SLUG}}pyproject.tomlrequirements.txtsetup.py*.pypyproject.tomlundefinedpyproject.tomlrequirements.txtsetup.py*.pypyproject.tomlundefined
**devcontainer.json extensions:**
Add to `customizations.vscode.extensions`:
```json
"ms-python.python",
"ms-python.vscode-pylance",
"charliermarsh.ruff"customizations.vscode.settings"python.defaultInterpreterPath": ".venv/bin/python",
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}pyproject.tomlrm -rf .venv && uv sync && uv run /opt/post_install.py
**devcontainer.json扩展:**
添加到`customizations.vscode.extensions`:
```json
"ms-python.python",
"ms-python.vscode-pylance",
"charliermarsh.ruff"customizations.vscode.settings"python.defaultInterpreterPath": ".venv/bin/python",
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}pyproject.tomlrm -rf .venv && uv sync && uv run /opt/post_install.pypackage.jsontsconfig.jsoncustomizations.vscode.extensions"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"customizations.vscode.settings"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}pnpm-lock.yamluv run /opt/post_install.py && pnpm install --frozen-lockfileyarn.lockuv run /opt/post_install.py && yarn install --frozen-lockfilepackage-lock.jsonuv run /opt/post_install.py && npm ciuv run /opt/post_install.py && npm installpackage.jsontsconfig.jsoncustomizations.vscode.extensions"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"customizations.vscode.settings"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}pnpm-lock.yamluv run /opt/post_install.py && pnpm install --frozen-lockfileyarn.lockuv run /opt/post_install.py && yarn install --frozen-lockfilepackage-lock.jsonuv run /opt/post_install.py && npm ciuv run /opt/post_install.py && npm installCargo.toml"ghcr.io/devcontainers/features/rust:1": {}customizations.vscode.extensions"rust-lang.rust-analyzer",
"tamasfe.even-better-toml"customizations.vscode.settings"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
}Cargo.lockuv run /opt/post_install.py && cargo build --lockeduv run /opt/post_install.py && cargo buildCargo.toml"ghcr.io/devcontainers/features/rust:1": {}customizations.vscode.extensions"rust-lang.rust-analyzer",
"tamasfe.even-better-toml"customizations.vscode.settings"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
}Cargo.lockuv run /opt/post_install.py && cargo build --lockeduv run /opt/post_install.py && cargo buildgo.mod"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
}customizations.vscode.extensions"golang.go"customizations.vscode.settings"[go]": {
"editor.defaultFormatter": "golang.go"
},
"go.useLanguageServer": trueuv run /opt/post_install.py && go mod downloadgo.mod"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
}customizations.vscode.extensions"golang.go"customizations.vscode.settings"[go]": {
"editor.defaultFormatter": "golang.go"
},
"go.useLanguageServer": trueuv run /opt/post_install.py && go mod downloadreferences/dockerfile-best-practices.mdreferences/features-vs-dockerfile.mdreferences/dockerfile-best-practices.mdreferences/features-vs-dockerfile.mddevcontainer.json"mounts": [
"source={{PROJECT_SLUG}}-<purpose>-${devcontainerId},target=<container-path>,type=volume"
]source={{PROJECT_SLUG}}-cargo-${devcontainerId},target=/home/vscode/.cargo,type=volumesource={{PROJECT_SLUG}}-go-${devcontainerId},target=/home/vscode/go,type=volumedevcontainer.json"mounts": [
"source={{PROJECT_SLUG}}-<purpose>-${devcontainerId},target=<container-path>,type=volume"
]source={{PROJECT_SLUG}}-cargo-${devcontainerId},target=/home/vscode/.cargo,type=volumesource={{PROJECT_SLUG}}-go-${devcontainerId},target=/home/vscode/go,type=volume.devcontainer/Dockerfiledevcontainer.jsonpost_install.py.zshrcinstall.shdevc.devcontainer/Dockerfiledevcontainer.jsonpost_install.py.zshrcinstall.shdevc{{PROJECT_NAME}}{{PROJECT_SLUG}}devcontainer.jsonpostCreateCommand&&{{PROJECT_NAME}}{{PROJECT_SLUG}}devcontainer.jsonpostCreateCommand&&devcontainer up --workspace-folder ..devcontainer/install.sh self-installdevcdevcontainer up --workspace-folder ..devcontainer/install.sh self-installdevc