Improve devcontainer

This commit is contained in:
Felipe Santos
2022-05-15 17:53:35 +00:00
parent c9b71eca7e
commit cc0962b31c
5 changed files with 44 additions and 18 deletions
+3
View File
@@ -1,4 +1,7 @@
default_config: default_config:
lovelace: lovelace:
mode: yaml mode: yaml
resources:
- url: http://127.0.0.1:5000/frigate-hass-card.js
type: module
demo: demo:
+21 -12
View File
@@ -1,14 +1,18 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details. // See https://aka.ms/vscode-remote/devcontainer.json for format details.
{ {
"name": "Boilerplate Card Development", "image": "ghcr.io/ludeeus/devcontainer/generic:latest",
"image": "ludeeus/container:monster", "forwardPorts": [5000, 8123],
"context": "..", "portsAttributes": {
"appPort": ["5000:5000", "9123:8123"], "5000": {
"postCreateCommand": "npm install", "label": "Rollup",
"runArgs": [ "onAutoForward": "silent"
"-v", },
"${env:HOME}${env:USERPROFILE}/.ssh:/tmp/.ssh" // This is added so you can push from inside the container "8123": {
], "label": "Home Assistant",
"onAutoForward": "notify"
}
},
"postCreateCommand": "yarn install",
"extensions": [ "extensions": [
"github.vscode-pull-request-github", "github.vscode-pull-request-github",
"eamodio.gitlens", "eamodio.gitlens",
@@ -22,11 +26,16 @@
], ],
"settings": { "settings": {
"files.eol": "\n", "files.eol": "\n",
"editor.tabSize": 4, "editor.tabSize": 2,
"terminal.integrated.shell.linux": "/bin/bash",
"editor.formatOnPaste": false, "editor.formatOnPaste": false,
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.formatOnType": true, "editor.formatOnType": true,
"files.trimTrailingWhitespace": true "files.trimTrailingWhitespace": true,
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
} }
} }
+2 -3
View File
@@ -1,7 +1,6 @@
resources:
- url: http://127.0.0.1:5000/frigate-card.js
type: module
views: views:
- cards: - cards:
- type: custom:frigate-card - type: custom:frigate-card
name: Frigate Card Development name: Frigate Card Development
cameras:
- camera_entity: camera.demo_camera
+15
View File
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"command": "yarn start",
"name": "Run yarn start",
"request": "launch",
"type": "node-terminal",
"internalConsoleOptions": "openOnFirstSessionStart"
}
]
}
+2 -2
View File
@@ -73,8 +73,8 @@
"typescript": "^4.6.2" "typescript": "^4.6.2"
}, },
"scripts": { "scripts": {
"start": "rollup -c rollup.config.dev.js --watch", "start": "rollup -c --watch",
"build": "npm run lint && npm run rollup", "build": "yarn run lint && yarn run rollup",
"lint": "eslint 'src/**/*.ts'", "lint": "eslint 'src/**/*.ts'",
"rollup": "rollup -c" "rollup": "rollup -c"
} }