Skip to content

Commit 76375a8

Browse files
Add dev container configuration for repo (microsoft#3440)
This should help opening PR in codespaces as well as helping new contributors
1 parent 0056b40 commit 76375a8

File tree

6 files changed

+27
-2
lines changed

6 files changed

+27
-2
lines changed

.devcontainer/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM mcr.microsoft.com/devcontainers/javascript-node:20
2+
3+
RUN corepack enable pnpm && \
4+
echo 'alias pnpm="corepack pnpm"' >> /home/node/.bash_aliases

.devcontainer/devcontainer.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Standard",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"customizations": {
7+
// Configure properties specific to VS Code.
8+
"vscode": {
9+
// Add the IDs of extensions you want installed when the container is created.
10+
"extensions": [
11+
"dbaeumer.vscode-eslint",
12+
"esbenp.prettier-vscode",
13+
"streetsidesoftware.code-spell-checker",
14+
"vitest.explorer"
15+
]
16+
}
17+
}
18+
}

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
auto-install-peers=true
2+
package-manager-strict=false

cspell.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ words:
2626
- createsorreplacesresource
2727
- createsorupdatesresource
2828
- CRUDL
29+
- dbaeumer
2930
- debouncer
3031
- devdiv
3132
- dogfood
3233
- eastus
3334
- ecmarkup
35+
- esbenp
3436
- esbuild
3537
- espt
3638
- ESRP

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ COPY . /app
88

99
WORKDIR /app
1010
ENV TYPESPEC_SKIP_VS_BUILD=1
11-
RUN npm install -g pnpm@8.13.1
11+
RUN corepack enable && corepack prepare
1212
RUN pnpm install --frozen-lockfile
1313
RUN pnpm --filter "@typespec/compiler..." run build
1414

eng/tsp-core/pipelines/templates/install.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ steps:
2727

2828
- script: |
2929
corepack enable
30-
corepack prepare pnpm@latest-8 --activate
30+
corepack prepare pnpm --activate
3131
displayName: Install pnpm
3232
- script: pnpm config set store-dir ${{ parameters.pnpmStorePath }}
3333
displayName: Setup pnpm cache dir

0 commit comments

Comments
 (0)