From fae75601194fafa6feeca91e03bb48aa451d8911 Mon Sep 17 00:00:00 2001 From: Egorrko Date: Fri, 7 Feb 2025 03:24:28 +0000 Subject: [PATCH] Add initial config for devcontainers. --- .devcontainer/devcontainer.json | 10 ++++++++++ CONTRIBUTING.md | 26 ++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..d6a4cb8c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,10 @@ +{ + "name": "Node.js & TypeScript & Yarn", + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", + "features": { + "ghcr.io/devcontainers/features/node:1": {} + }, + "postCreateCommand": { + "Install dependencies": "yarn install" + } +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a9228bae..67b38d9f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,8 +36,30 @@ Please note that commit hooks will run automatically to perform some tasks; #### Windows users Make sure your editor and terminal that run the tests are set to `Powershell 7` or above with -`Git's Unix tools for Windows` installed. This is because some tests require you to be able to run `sh` and other -unix commands. +`Git's Unix tools for Windows` installed. This is because some tests require you to be able to run `sh` and other unix +commands. + +#### Development Containers + +This project supports development containers (dev containers) which provide a consistent, pre-configured development +environment. Using dev containers is recommended as it ensures all contributors work with the same development setup. + +To use dev containers: + +1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) +2. Install the + [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in + VS Code +3. Clone the repository and open it in VS Code +4. When prompted, click "Reopen in Container" or use the command palette (F1) and select "Dev Containers: Reopen in + Container" + +The dev container will automatically: + +- Set up Node.js and TypeScript environment +- Install project dependencies using Yarn + +This eliminates the need to manually install Node.js, Yarn, and other dependencies on your local machine. #### License