From 98d18a8c5eaf99719a48eaf3832059e1f48f8495 Mon Sep 17 00:00:00 2001 From: Aakash Singh Date: Tue, 22 Aug 2023 19:46:55 +0530 Subject: [PATCH] add devcontainer config (#6126) --- .devcontainer/devcontainer.json | 40 +++++++++++++++++++++++++++++++++ .gitignore | 3 ++- .vscode/launch.json | 23 +++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/launch.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..4fe94183a2f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,40 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node +{ + "name": "care_fe", + "image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye", + "features": { + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "moby": true, + "installDockerBuildx": true, + "version": "latest", + "dockerDashComposeVersion": "v2" + } + }, + "customizations": { + "vscode": { + "settings": {}, + "extensions": [ + "esbenp.prettier-vscode", + "bradlc.vscode-tailwindcss", + "yoavbls.pretty-ts-errors", + "chenglou92.rescript-vscode" + ] + } + }, + "hostRequirements": { + "cpus": 4 + }, + "waitFor": "onCreateCommand", + "postCreateCommand": "npm install", + "postAttachCommand": { + "server": "npm run dev" + }, + "portsAttributes": { + "4000": { + "label": "Application", + "onAutoForward": "openPreview" + } + }, + "forwardPorts": [4000] +} diff --git a/.gitignore b/.gitignore index 8b0b6a10d3c..b97356ed20f 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,8 @@ storybook-static .swp stats.json public/build-meta.json -.vscode +.vscode/* +!.vscode/launch.json # Reason React diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..d512e87ec49 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Run application", + "type": "node", + "request": "launch", + "cwd": "${workspaceFolder}", + "console": "integratedTerminal", + "runtimeExecutable": "npm", + "runtimeArgs": [ + "run-script", + "dev" + ], + "skipFiles": [ + "/**" + ] + } + ] +} \ No newline at end of file