From 60973bd4fc29caf9ba13d0505e0bf13ad0db65c5 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 10 Oct 2023 08:16:24 +0000 Subject: [PATCH] Add support for GitHub Codespaces --- .devcontainer/devcontainer.json | 36 +++++++++++++++++++++++++++++++++ .vscode/settings.json | 3 ++- .vscode/tasks.json | 16 +++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..167695276 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,36 @@ +// 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": "Node.js & TypeScript", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "npm install", + "customizations": { + "vscode": { + "extensions": [ + "esbenp.prettier-vscode", + "streetsidesoftware.code-spell-checker" + ] + } + }, + "portsAttributes": { + "6006": { + "label": "Storybook", + "onAutoForward": "notify" + } + } + + // Configure tool-specific properties. + // "customizations": {}, + + // 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 dcaaedc1b..7d5502898 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "cSpell.words": ["combobox", "cssprop", "noopener", "noreferrer", "Umbraco"] + "cSpell.words": ["combobox", "cssprop", "noopener", "noreferrer", "Umbraco"], + "npm.enableRunFromFolder": true } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..214b0b08d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "build", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [], + "label": "npm: build", + "detail": "Builds each package" + } + ] +}