From 7735d7e402a2b2c39a417fc6f3e77ad36eea33ad Mon Sep 17 00:00:00 2001 From: Matthew Strasiotto <39424834+matthewstrasiotto@users.noreply.github.com> Date: Sat, 23 Apr 2022 19:44:24 +1000 Subject: [PATCH] Add .vscode tasks + launch configs --- .vscode/launch.json | 21 +++++++++++++++++++ .vscode/settings.json | 6 ++++++ .vscode/tasks.json | 49 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3330a80 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + // 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": [ + { + "type": "coreclr", + "name": "Launch", + "request": "launch", + "preLaunchTask": "build-and-copy", + "program": "${config:jellyfinDir}/bin/Debug/net6.0/jellyfin.dll", + "args": [ + //"--nowebclient" + "--webdir", + "${config:jellyfinWebDir}/dist/" + ], + "cwd": "${config:jellyfinDir}", + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c0a8a54 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "jellyfinDir" : "${workspaceFolder}/../jellyfin/Jellyfin.Server", + "jellyfinWebDir" : "${workspaceFolder}/../jellyfin-web", + "jellyfinDataDir" : "${env:LOCALAPPDATA}/jellyfin", + "pluginName" : "Jellyfin.Plugin.Template", +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..3717039 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,49 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + + "tasks": [ + { + "label": "build-and-copy", + "dependsOrder": "sequence", + "dependsOn": ["build", "make-plugin-dir", "copy-dll"] + }, + { + "label": "build", + "command": "dotnet", + "type": "shell", + "args": [ + "publish", + "${workspaceFolder}/${config:pluginName}.sln", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "group": "build", + "presentation": { + "reveal": "silent" + }, + "problemMatcher": "$msCompile" + }, + { + "label": "make-plugin-dir", + "type": "shell", + "command": "mkdir", + "args": [ + "-Force", + "-Path", + "${config:jellyfinDataDir}/plugins/${config:pluginName}/" + ] + }, + { + "label": "copy-dll", + "type": "shell", + "command": "cp", + "args": [ + "./${config:pluginName}/bin/Debug/net6.0/publish/*", + "${config:jellyfinDataDir}/plugins/${config:pluginName}/" + ] + + }, + ] +}