Skip to content

Commit f78bda9

Browse files
gkalpakjasonaden
authored andcommitted
build: add recommended config files for VSCode remote development (angular#30450)
Add some recommended config files to use (as is or as basis) for setting up [remote development using docker containers][1] with VSCode. This is an opt-in feature. See `.devcontainer/README.md` for more info. The configuration can be further tweaked/improved, but is a good starting point. [1]: https://code.visualstudio.com/docs/remote/containers PR Close angular#30450
1 parent 6454f76 commit f78bda9

File tree

5 files changed

+45
-1
lines changed

5 files changed

+45
-1
lines changed

.devcontainer/recommended-Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Image metadata and config.
2+
FROM circleci/node:10-browsers
3+
4+
LABEL name="Angular dev environment" \
5+
description="This image can be used to create a dev environment for building Angular." \
6+
vendor="angular" \
7+
version="1.0"
8+
9+
EXPOSE 4000 4200 4433 5000 8080 9876
10+
11+
12+
# Switch to `root` (CircleCI images use `circleci` as the user).
13+
USER root
14+
15+
16+
# Configure `Node.js`/`npm` and install utilities.
17+
RUN npm config --global set user root
18+
RUN npm install --global [email protected] # This needs to be in sync with what we use on CI.
19+
20+
21+
# Go! (And keep going.)
22+
CMD ["tail", "--follow", "/dev/null"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Reference: https://code.visualstudio.com/docs/remote/containers#_devcontainerjson-reference
2+
{
3+
"name": "Angular dev container",
4+
"dockerFile": "Dockerfile",
5+
"appPort": [4000, 4200, 4433, 5000, 8080, 9876],
6+
"postCreateCommand": "yarn install",
7+
"extensions": [
8+
"devondcarew.bazel-code",
9+
"gkalpak.aio-docs-utils",
10+
"ms-vscode.vscode-typescript-tslint-plugin",
11+
"xaver.clang-format",
12+
// The following extensions are useful when working on angular.io (i.e. inside the `aio/` directory).
13+
//"angular.ng-template",
14+
//"dbaeumer.vscode-eslint",
15+
],
16+
}

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ testing/** @angular/fw-test
855855
/.buildkite/** @angular/fw-dev-infra
856856
/.circleci/** @angular/fw-dev-infra
857857
/.codefresh/** @angular/fw-dev-infra
858+
/.devcontainer/** @angular/fw-dev-infra
858859
/.github/** @angular/fw-dev-infra
859860
/.vscode/** @angular/fw-dev-infra
860861
/docs/BAZEL.md @angular/fw-dev-infra

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ tools/gulp-tasks/cldr/cldr-data/
1111
pubspec.lock
1212
.c9
1313
.idea/
14-
.devcontainer
14+
.devcontainer/*
15+
!.devcontainer/recommended-devcontainer.json
16+
!.devcontainer/recommended-Dockerfile
1517
.settings/
1618
.vscode/launch.json
1719
.vscode/settings.json

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
"gkalpak.aio-docs-utils",
99
"ms-vscode.vscode-typescript-tslint-plugin",
1010
"xaver.clang-format",
11+
// The following extensions are useful when working on angular.io (i.e. inside the `aio/` directory).
12+
//"angular.ng-template",
13+
//"dbaeumer.vscode-eslint",
1114
],
1215
}

0 commit comments

Comments
 (0)