Skip to content

Commit 165a385

Browse files
committed
add devcontainer
1 parent fa76233 commit 165a385

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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/ubuntu
3+
{
4+
"name": "amsreader-devcontainer",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/base:jammy",
7+
"features": {
8+
"ghcr.io/devcontainers/features/node:1": {
9+
"version": "16",
10+
"pnpmVersion": "none",
11+
"nvmVersion": "latest"
12+
},
13+
"ghcr.io/devcontainers/features/python:1": {
14+
"version": "3.9"
15+
}
16+
},
17+
18+
// Use 'postCreateCommand' to run commands after the container is created.
19+
"postCreateCommand": ".devcontainer/postCreateCommand.sh",
20+
21+
// Configure tool-specific properties.
22+
"customizations": {
23+
"vscode": {
24+
"extensions": [
25+
"platformio.platformio-ide",
26+
"ms-vscode.cpptools",
27+
"svelte.svelte-vscode"
28+
]
29+
}
30+
}
31+
}

.devcontainer/postCreateCommand.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Upgrade pip
5+
python -m pip install --upgrade pip
6+
7+
# Install Python packages
8+
pip install -U platformio css_html_js_minify
9+
10+
# Navigate to the Svelte app directory
11+
cd lib/SvelteUi/app
12+
13+
# Install npm dependencies and build the app
14+
npm ci
15+
npm run build
16+
17+
# Return to the previous directory
18+
cd -

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.{cmd,[cC][mM][dD]} text eol=crlf
3+
*.{bat,[bB][aA][tT]} text eol=crlf

0 commit comments

Comments
 (0)