Skip to content

Commit 3a57f40

Browse files
committed
devcontainer: inital config
This adds a devcontainer config for devs to have an easy way to get a working dev environment.
1 parent 4c4ce8f commit 3a57f40

File tree

5 files changed

+49
-1
lines changed

5 files changed

+49
-1
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mcr.microsoft.com/devcontainers/typescript-node:1-18-bookworm
2+
# Install the xz-utils package
3+
RUN apt-get update && apt-get install -y libpango1.0-dev

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "Pybricks Code",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"build": {
7+
// Path is relative to the devcontainer.json file.
8+
"dockerfile": "Dockerfile"
9+
},
10+
11+
// Features to add to the dev container. More info: https://containers.dev/features.
12+
// "features": {},
13+
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
// "forwardPorts": [],
16+
17+
// Use 'postCreateCommand' to run commands after the container is created.
18+
"postCreateCommand": "yarn",
19+
20+
// Configure tool-specific properties.
21+
"customizations": {
22+
"vscode": {
23+
"extensions": [
24+
"dbaeumer.vscode-eslint",
25+
"esbenp.prettier-vscode",
26+
"psioniq.psi-header"
27+
]
28+
}
29+
}
30+
31+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
32+
// "remoteUser": "root"
33+
}

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
17
version: 2
28
updates:
39
- package-ecosystem: npm
@@ -9,3 +15,7 @@ updates:
915
- dependency-name: "@types/node"
1016
versions:
1117
- ">= 19.a"
18+
- package-ecosystem: "devcontainers"
19+
directory: "/"
20+
schedule:
21+
interval: weekly

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"editor.defaultFormatter": "esbenp.prettier-vscode"
1313
},
1414
"editor.codeActionsOnSave": {
15-
"source.fixAll.eslint": true
15+
"source.fixAll.eslint": "explicit"
1616
},
1717
"eslint.validate": [
1818
"javascript",

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ will do nice things like automatically format the code for you.
1616

1717
These are the required software tools you need to install on your computer.
1818

19+
Alternatly, you can use a devcontainer locally via Docker or using GitHub Codespaces.
20+
1921
### Node.js
2022

2123
We are using [Node.js][node] v18.x. We recommend using a tool such as [asdf][asdf]

0 commit comments

Comments
 (0)