From a0315e7b64e0dd02a58ce33d8b6efafff7a7edca Mon Sep 17 00:00:00 2001 From: vsoch Date: Mon, 3 Nov 2025 12:32:19 -0800 Subject: [PATCH] feat: vscode developer environment Problem: installing npm directly on the system is not ideal Solution: provide a VSCode developer environment that provisions npm with the latest container. The npm install (and development) will only work given the individual developer has access to the hmxlabs private repositories within the package json file. Signed-off-by: vsoch --- .devcontainer/Dockerfile | 4 ++++ .devcontainer/devcontainer.json | 18 ++++++++++++++++++ README.md | 4 ++++ 3 files changed, 26 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..4e54231 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,4 @@ +FROM node:lts-slim +USER root +RUN apt-get update && apt-get install -y git && apt-get clean +USER node \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..cdd80bb --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +{ + "name": "Node.js Development", + "build": { + "dockerfile": "Dockerfile" + }, + "customizations": { + "vscode": { + "settings": {}, + "extensions": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode" + ] + } + }, + "forwardPorts": [3000], + "postCreateCommand": "npm install", + "remoteUser": "node" +} diff --git a/README.md b/README.md index e06e6db..b7f6ed8 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ Instead, it will copy all the configuration files and the transitive dependencie You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. +## Development Environment + +A VSCode developer environment is provided. Open VSCode, and then select "Open in Container" from the interactive button, or search for "Dev Containers" in the command palette. For the start command to be successful (`npm install`) you will need access to private repositories provided by hmxlabs. + ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).