From 0191ebc7a4c5e17d098908119c67f22aea86e328 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Sun, 3 Jan 2021 20:08:01 +0530 Subject: [PATCH] feat: add support for dev containers (#2287) * chore: add support for dev containers * docs: update contribution guide --- .devcontainer/Dockerfile | 4 ++++ .devcontainer/devcontainer.json | 10 ++++++++++ .github/CONTRIBUTING.md | 2 ++ 3 files changed, 16 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 00000000000..2af70d687af --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,4 @@ +FROM node:12 + +# Add global instances of prettier and eslint for vscode +RUN npm install -g eslint prettier \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..264b218cf9b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,10 @@ +{ + "name": "webpack-cli", + "dockerFile": "Dockerfile", + "runArgs": ["-u", "node"], + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + "postCreateCommand": "yarn install && yarn bootstrap && yarn build", + "extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] +} diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6b6fb20f151..c32b815ef98 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -80,6 +80,8 @@ In case you are suggesting a new feature, we will match your idea with our curre yarn build ``` +> If you are a Docker and Visual Studio Code user, you can quickstart development using [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) Extension + ## Running Tests ### Using yarn