Skip to content

Commit c2bc68c

Browse files
authoredJul 13, 2020
devcontainer for ts-loader (#1143)
1 parent cb487e4 commit c2bc68c

File tree

9 files changed

+442
-3
lines changed

9 files changed

+442
-3
lines changed
 

‎.devcontainer/Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#-------------------------------------------------------------------------------------------------------------
2+
# Based on:
3+
# https://github.com/microsoft/vscode-dev-containers/tree/v0.122.1/containers/typescript-node-14/.devcontainer/Dockerfile
4+
#-------------------------------------------------------------------------------------------------------------
5+
6+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:14
7+
8+
# The javascript-node image includes a non-root node user with sudo access. Use
9+
# the "remoteUser" property in devcontainer.json to use it. On Linux, the container
10+
# user's GID/UIDs will be updated to match your local UID/GID when using the image
11+
# or dockerFile property. Update USER_UID/USER_GID below if you are using the
12+
# dockerComposeFile property or want the image itself to start with different ID
13+
# values. See https://aka.ms/vscode-remote/containers/non-root-user for details.
14+
ARG USERNAME=node
15+
ARG USER_UID=1000
16+
ARG USER_GID=$USER_UID
17+
18+
# Alter node user as needed. eslint is installed by javascript image
19+
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
20+
groupmod --gid $USER_GID $USERNAME \
21+
&& usermod --uid $USER_UID --gid $USER_GID $USERNAME \
22+
&& chmod -R $USER_UID:$USER_GID /home/$USERNAME \
23+
&& chmod -R $USER_UID:root /usr/local/share/nvm /usr/local/share/npm-global; \
24+
fi
25+
26+
# Set the Chrome repo.
27+
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
28+
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
29+
30+
# Install Chrome.
31+
RUN apt-get update && apt-get -y install google-chrome-stable \
32+
&& rm -rf /var/lib/apt/lists/*
33+
34+
35+
# ** [Optional] Uncomment this section to install additional packages. **
36+
#
37+
# RUN apt-get update \
38+
# && export DEBIAN_FRONTEND=noninteractive \
39+
# && apt-get -y install --no-install-recommends <your-package-list-here>
40+

‎.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.122.1/containers/typescript-node-14
3+
{
4+
"name": "ts-loader devcontainer",
5+
"dockerFile": "Dockerfile",
6+
7+
// Set *default* container specific settings.json values on container create.
8+
"settings": {
9+
"terminal.integrated.shell.linux": "/bin/zsh"
10+
},
11+
12+
// Add the IDs of extensions you want installed when the container is created.
13+
"extensions": [
14+
"dbaeumer.vscode-eslint"
15+
],
16+
17+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
18+
"forwardPorts": [/* for debugging execution tests */ 9876],
19+
20+
// Use 'postCreateCommand' to run commands after the container is created.
21+
"postCreateCommand": "yarn install",
22+
23+
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
24+
// "remoteUser": "node"
25+
}

‎.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.devcontainer
12
.git
23
.github
34
.vscode

‎.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ npm-debug.log
2020
.pnp
2121
.pnp.js
2222
!.eslintrc.js
23-
.vs/**
23+
.vs/**
24+
.pnpm-store

‎.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.devcontainer
12
.vscode
23
.test
34
examples

‎.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ language: node_js
66
node_js:
77
- "10"
88
- "12"
9+
- "14"
910
sudo: required
1011
install:
1112
- yarn install

‎Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:10
1+
FROM node:14
22

33
# See https://crbug.com/795759
44
RUN apt-get update && apt-get install -yq libgconf-2-4

‎appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: Visual Studio 2017
22
environment:
33
FORCE_COLOR: 1
4-
nodejs_version: "10"
4+
nodejs_version: "14"
55
matrix:
66
- TYPESCRIPT: typescript@3.9.3
77
- TYPESCRIPT: typescript@next

‎test/execution-tests/pnpm/pnpm-lock.yaml

Lines changed: 370 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.