Skip to content

Commit

Permalink
Switch to devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Mar 9, 2021
1 parent df5db63 commit 90bcb7f
Show file tree
Hide file tree
Showing 9 changed files with 274 additions and 239 deletions.
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "Layout-card Dev",
"image": "thomasloven/hass-custom-devcontainer",
"postCreateCommand": "sudo -E container setup-dev && npm add",
"containerEnv": {
"DEVCONTAINER": "1"
},
"forwardPorts": [8123],
"mounts": [
"source=${localWorkspaceFolder},target=/config/www/workspace,type=bind",
"source=${localWorkspaceFolder}/test,target=/config/test,type=bind",
"source=${localWorkspaceFolder}/test/configuration.yaml,target=/config/configuration.yaml,type=bind"
],
"runArgs": ["--env-file", "${localWorkspaceFolder}/test/.env"],
"extensions": [
"github.vscode-pull-request-github",
"esbenp.prettier-vscode",
"spmeesseman.vscode-taskexplorer"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 2,
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.trimTrailingWhitespace": true
}
}

31 changes: 31 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "npm: build",
"type": "npm",
"script": "build",
"problemMatcher": []
},
{
"label": "npm: watch",
"type": "npm",
"script": "watch",
"problemMatcher": [],
"presentation": {
"panel": "shared",
"group": "test"
}
},
{
"label": "Run hass",
"type": "shell",
"command": "sudo container launch",
"problemMatcher": [],
"presentation": {
"panel": "shared",
"group": "test"
}
}
]
}
4 changes: 2 additions & 2 deletions layout-card.js

Large diffs are not rendered by default.

Loading

0 comments on commit 90bcb7f

Please sign in to comment.