chore(devcontainer): Update tasks
This commit is contained in:
parent
29b10a6c22
commit
163e96772d
|
@ -5,7 +5,7 @@
|
|||
"context": "..",
|
||||
"remoteUser": "vscode",
|
||||
"appPort": ["5000:5000", "9123:8123"],
|
||||
"postCreateCommand": "yarn install",
|
||||
"postCreateCommand": "yarn install && sudo container install",
|
||||
"runArgs": ["-v", "${localWorkspaceFolder}/.devcontainer/www:/config/www"],
|
||||
"extensions": [
|
||||
"github.vscode-pull-request-github",
|
||||
|
|
|
@ -7,37 +7,12 @@
|
|||
{
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Chrome Localhost",
|
||||
"name": "Launch Chrome against localhost",
|
||||
"url": "http://localhost:8123",
|
||||
"webRoot": "${workspaceFolder}/dist",
|
||||
"sourceMaps": true
|
||||
// "runtimeExecutable": "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
|
||||
},
|
||||
{
|
||||
"type": "browser-preview",
|
||||
"request": "attach",
|
||||
"name": "Browser Preview: Attach",
|
||||
"webRoot": "${workspaceFolder}/dist",
|
||||
"pathMapping": {
|
||||
"http://127.0.0.1:5000/": "${workspaceFolder}/dist"
|
||||
}
|
||||
// "sourceMapPathOverrides": {
|
||||
// "http://127.0.0.1:5000": "${workspaceFolder}/dist"
|
||||
// },
|
||||
},
|
||||
{
|
||||
"type": "browser-preview",
|
||||
"request": "launch",
|
||||
"name": "Browser Preview: Launch",
|
||||
"url": "http://localhost:9123",
|
||||
"webRoot": "${workspaceFolder}/dist"
|
||||
// "sourceMapPathOverrides": {
|
||||
// "http://127.0.0.1:5000": "${workspaceFolder}/dist"
|
||||
// },
|
||||
// "pathMapping": {
|
||||
// "http://127.0.0.1:5000": "${workspaceFolder}/dist"
|
||||
// },
|
||||
// "trace": true
|
||||
"sourceMaps": true,
|
||||
"preLaunchTask": "debug",
|
||||
"postDebugTask": "devcontainer: stop debug"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,28 +1,73 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [{
|
||||
"label": "Run Home Assistant on port 9123",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch",
|
||||
"group": "test",
|
||||
"label": "npm: watch",
|
||||
"detail": "rollup -c --watch",
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^bundles\\s",
|
||||
"endsPattern": "^.*waiting for changes\\.\\.\\."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "dc start",
|
||||
"label": "devcontainer: Start HA",
|
||||
"command": "sh -c 'sudo --preserve-env=PATH container start'",
|
||||
"problemMatcher": {
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": "^Start Home Assistant$"
|
||||
}
|
||||
},
|
||||
"group": "test",
|
||||
"isBackground": true
|
||||
},
|
||||
{
|
||||
"label": "debug",
|
||||
"group": "test",
|
||||
"dependsOn": ["devcontainer: Start HA", "npm: watch"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run Home Assistant configuration against /config",
|
||||
"type": "shell",
|
||||
"command": "dc check",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Upgrade Home Assistant to latest dev",
|
||||
"type": "shell",
|
||||
"command": "dc install",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Install a spesific version of Home Assistant",
|
||||
"type": "shell",
|
||||
"command": "dc set-version",
|
||||
"problemMatcher": []
|
||||
"label": "devcontainer: stop debug",
|
||||
"group": "test",
|
||||
"command": "sh",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": false
|
||||
},
|
||||
"args": [
|
||||
"-c",
|
||||
"sudo killall hass; sudo kill $(ps au | grep 'node.*rollup' | grep -v grep | awk {'print $2'}); exit 0;"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"rollup": "rollup -c",
|
||||
"babel": "babel dist/button-card.js --out-file dist/button-card.js",
|
||||
"lint": "eslint src/*.ts",
|
||||
"start": "rollup -c --watch",
|
||||
"watch": "rollup -c --watch",
|
||||
"postversion": "npm run build"
|
||||
},
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue