From ca3c4981f98729a8d323b4fcccc008ecaa70e4f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Feb 2026 15:31:01 +0000 Subject: [PATCH] Add VS Code launch.json and tasks.json for development workflow Adds launch/debug configurations and build tasks modeled after the Umbraco-CMS repository, adapted for BlockPreview's project structure. Also fixes the default solution path in settings.json. https://claude.ai/code/session_015JoPQr4bPMG8ZTb567haCd --- .vscode/launch.json | 29 +++++++++++++++ .vscode/settings.json | 2 +- .vscode/tasks.json | 87 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..7eedfb7e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (TestSite)", + "type": "coreclr", + "request": "launch", + "program": "dotnet", + "args": ["run"], + "cwd": "${workspaceFolder}/examples/Umbraco.Community.BlockPreview.TestSite", + "stopAtEntry": false, + "requireExactSource": false, + "postDebugTask": "kill-test-site", + "serverReadyAction": { + "action": "openExternally", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 345a2ffa..2a6dc911 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "dotnet.defaultSolution": "src/Umbraco.Community.BlockPreview.sln" + "dotnet.defaultSolution": "Umbraco.Community.BlockPreview.sln" } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..a2af3e3c --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,87 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build", + "detail": "Builds the client and solution", + "promptOnClose": true, + "group": "build", + "dependsOn": ["Client Build", "Dotnet build"], + "problemMatcher": [] + }, + { + "label": "Client Install", + "detail": "Install npm packages for BlockPreview.UI", + "promptOnClose": true, + "type": "npm", + "script": "install", + "path": "src/Umbraco.Community.BlockPreview.UI/", + "problemMatcher": [] + }, + { + "label": "Client Build", + "detail": "Runs npm run build for BlockPreview.UI", + "promptOnClose": true, + "group": "build", + "type": "npm", + "script": "build", + "path": "src/Umbraco.Community.BlockPreview.UI/", + "problemMatcher": [] + }, + { + "label": "Client Watch", + "detail": "Runs npm run dev for BlockPreview.UI", + "promptOnClose": true, + "group": "build", + "type": "npm", + "script": "dev", + "path": "src/Umbraco.Community.BlockPreview.UI/", + "problemMatcher": [] + }, + { + "label": "Dotnet build", + "detail": "Dotnet build of solution", + "promptOnClose": true, + "group": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/Umbraco.Community.BlockPreview.sln", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "Dotnet watch", + "detail": "Dotnet run and watch of TestSite", + "promptOnClose": true, + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/examples/Umbraco.Community.BlockPreview.TestSite/Umbraco.Community.BlockPreview.TestSite.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "kill-test-site", + "type": "shell", + "problemMatcher": [], + "osx": { + "command": "pkill -f Umbraco.Community.BlockPreview.TestSite" + }, + "linux": { + "command": "pkill -f Umbraco.Community.BlockPreview.TestSite" + }, + "windows": { + "command": "taskkill /IM Umbraco.Community.BlockPreview.TestSite.exe /F" + } + } + ] +}