diff --git a/.devcontainer/configuration.yaml b/.devcontainer/configuration.yaml index 9b01ded0..c3974ac7 100644 --- a/.devcontainer/configuration.yaml +++ b/.devcontainer/configuration.yaml @@ -1,4 +1,7 @@ default_config: lovelace: mode: yaml -demo: \ No newline at end of file + resources: + - url: http://127.0.0.1:5000/frigate-hass-card.js + type: module +demo: diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 98c934be..a6446e45 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,18 @@ // See https://aka.ms/vscode-remote/devcontainer.json for format details. { - "name": "Boilerplate Card Development", - "image": "ludeeus/container:monster", - "context": "..", - "appPort": ["5000:5000", "9123:8123"], - "postCreateCommand": "npm install", - "runArgs": [ - "-v", - "${env:HOME}${env:USERPROFILE}/.ssh:/tmp/.ssh" // This is added so you can push from inside the container - ], + "image": "ghcr.io/ludeeus/devcontainer/generic:latest", + "forwardPorts": [5000, 8123], + "portsAttributes": { + "5000": { + "label": "Rollup", + "onAutoForward": "silent" + }, + "8123": { + "label": "Home Assistant", + "onAutoForward": "notify" + } + }, + "postCreateCommand": "yarn install", "extensions": [ "github.vscode-pull-request-github", "eamodio.gitlens", @@ -22,11 +26,16 @@ ], "settings": { "files.eol": "\n", - "editor.tabSize": 4, - "terminal.integrated.shell.linux": "/bin/bash", + "editor.tabSize": 2, "editor.formatOnPaste": false, "editor.formatOnSave": true, "editor.formatOnType": true, - "files.trimTrailingWhitespace": true + "files.trimTrailingWhitespace": true, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } } diff --git a/.devcontainer/ui-lovelace.yaml b/.devcontainer/ui-lovelace.yaml index d24ca157..f6884dc7 100644 --- a/.devcontainer/ui-lovelace.yaml +++ b/.devcontainer/ui-lovelace.yaml @@ -1,7 +1,6 @@ -resources: - - url: http://127.0.0.1:5000/frigate-card.js - type: module views: - cards: - type: custom:frigate-card name: Frigate Card Development + cameras: + - camera_entity: camera.demo_camera diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..076d1551 --- /dev/null +++ b/.vscode/launch.json @@ -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" + } + ] +} diff --git a/package.json b/package.json index 78284c00..831abe09 100644 --- a/package.json +++ b/package.json @@ -73,8 +73,8 @@ "typescript": "^4.6.2" }, "scripts": { - "start": "rollup -c rollup.config.dev.js --watch", - "build": "npm run lint && npm run rollup", + "start": "rollup -c --watch", + "build": "yarn run lint && yarn run rollup", "lint": "eslint 'src/**/*.ts'", "rollup": "rollup -c" }