diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..4e95fff --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,41 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node +{ + "name": "HyperTuner Cloud", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04", + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + // default dev server port + 5173 + ], + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", + // Configure tool-specific properties. + "customizations": { + "vscode": { + // NOTE: keep this in sync with: .vscode/extensions.json + "extensions": [ + "editorconfig.editorconfig", + "davidanson.vscode-markdownlint", + "streetsidesoftware.code-spell-checker", + "rome.rome" + ] + } + }, + // install dependencies + "postCreateCommand": "npm i", + // run dev server + "postStartCommand": "npm start", + "containerUser": "vscode", + "waitFor": "postCreateCommand", + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "node": { + "version": "18" + }, + "github-cli": "latest" + } + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.vscode/settings.json b/.vscode/settings.json index da75632..cd29777 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,7 @@ "editor.formatOnSave": true, "cSpell.words": [ "baro", + "devcontainers", "FOME", "hypertuner", "kbar", diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a4ca513..4cabdf5 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -2,23 +2,29 @@ This guide will help you set up this project. -## Requirements +## Using GitHub Codespaces + +This project is configured to work with GitHub [Codespaces](https://github.com/features/codespaces). To use it, simply open the project in a Codespace using GitHub's UI. + +## Local development + +### Requirements - Node Version Manager: [nvm](https://github.com/nvm-sh/nvm) -### Setup local environment variables +#### Setup local environment variables ```bash cp .env .env.local ``` -### Setup correct Node.js version +#### Setup correct Node.js version ```bash nvm use ``` -### Install dependencies and run in development mode +#### Install dependencies and run in development mode ```bash # install packages