Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
"ghcr.io/devcontainers/features/node:1": {}
},

"settings": {
},

"customizations": {
"vscode": {
"extensions": [
Expand All @@ -29,5 +26,7 @@
"golang.go"
]
}
}
},

"postStartCommand": ".devcontainer/post-start-command.sh"
}
10 changes: 10 additions & 0 deletions .devcontainer/post-start-command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -eu

# Install NPM dependencies to node_modules. Enables type completion.
# Remove extraneous packages.
pnpm install
pnpm prune

# Initiate build. Enables type completion for generated files.
# Don't bother cleaning, as Bazel provides hermetic/repeatable builds.
bazel build --keep_going ...
13 changes: 13 additions & 0 deletions .vscode/refresh-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash -eux

cd $(dirname $0)/..

# NPM dependencies
pnpm install

# Incorporate new dependencies in go.mod
bazel run @go_sdk//:bin/go -- mod tidy
bazel run //:gazelle-update-repos

# Add any new dependencies in sources to BUILD files
bazel run //:gazelle
19 changes: 19 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Refresh Dependencies",
"type": "shell",
"command": "./.vscode/refresh-dependencies.sh",
"problemMatcher": [],
"presentation": {
"reveal": "always",
"panel": "dedicated",
"focus": true,
"clear": true,
}
}
]
}