Skip to content

Commit ce3711e

Browse files
akutruffcolinhacks
authored andcommitted
add VSCode dev container support and documenation
1 parent 1438861 commit ce3711e

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12+
// "forwardPorts": [],
13+
14+
// Use 'postCreateCommand' to run commands after the container is created.
15+
"postCreateCommand": "yarn install"
16+
17+
// Configure tool-specific properties.
18+
// "customizations": {},
19+
20+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21+
// "remoteUser": "root"
22+
}

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ The following steps will get you setup to contribute changes to this repo:
3131

3232
4. Start playing with the code! You can do some simple experimentation in [`playground.ts`](playground.ts) (see `yarn play` below) or start implementing a feature right away.
3333

34+
## Alternative: VSCode Dev Container setup
35+
36+
For an officially supported isolated dev environment that automatically installs dependencies for you:
37+
38+
1. `F1` in VSCode and start typing `Dev Containers: Clone Repository in Named Container Volume` to run the command.
39+
2. For the repo, paste `[email protected]:{your_username}/zod.git` if you're using ssh.
40+
3. Click `Create a new volume...` and name it `zod` and the folder name as `zod`.
41+
42+
Note: if you can't see `Dev Containers` in the `F1` menu, follow [this guide](https://code.visualstudio.com/docs/devcontainers/tutorial) to install the needed extension.
43+
In the OSS version of VSCode the extension may be not available.
44+
3445
### Commands
3546

3647
**`yarn build`**

0 commit comments

Comments
 (0)