From f8af10f5f5ba0d7579a8ef6a080e2b609f697bb8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 30 Oct 2021 14:31:43 -0700 Subject: [PATCH 1/2] Escape '#' in local package path. The `#` symbol was causing the symlink that npm creates to point at just `/source/` rather than `/source/#external/` --- source/WebApp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/WebApp/package.json b/source/WebApp/package.json index 4810ac8c1..b39199b02 100644 --- a/source/WebApp/package.json +++ b/source/WebApp/package.json @@ -106,7 +106,7 @@ "dateformat": "1.0.12", "lz-string": "1.4.4", "marked": "0.7.0", - "mirrorsharp": "file:../#external/mirrorsharp/WebAssets/dist", + "mirrorsharp": "file:../%23external/mirrorsharp/WebAssets/dist", "mirrorsharp-codemirror-6-preview": "0.0.11", "normalize.css": "8.0.1", "portal-vue": "2.1.7", From 7bf4ae24d62c7c585922046e44741deec15bf770 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 30 Oct 2021 14:38:35 -0700 Subject: [PATCH 2/2] Install roslyn-branches npm modules during setup This allows `./sl roslyn-branches` to work after running `./sl setup` (before it just complained about missing modules) --- #scripts/setup.ps1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/#scripts/setup.ps1 b/#scripts/setup.ps1 index 7439a1f57..42ff20134 100644 --- a/#scripts/setup.ps1 +++ b/#scripts/setup.ps1 @@ -18,6 +18,18 @@ if ($LastExitCode -ne 0) { throw "dotnet failed with exit code $LastExitCode" } +Write-Host "Installing node modules: roslyn-branches" -ForegroundColor White +Push-Location "$PSScriptRoot/roslyn-branches" +try { + npm ci + if ($LastExitCode -ne 0) { + throw "npm ci failed with exit code $LastExitCode" + } +} +finally { + Pop-Location +} + Write-Host "Preparing externals: mirrorsharp" -ForegroundColor White Push-Location './source/#external/mirrorsharp/WebAssets' try { @@ -51,4 +63,4 @@ Write-Host "" Write-Host "SharpLab setup done." -ForegroundColor White Write-Host "Run " -ForegroundColor White -NoNewLine Write-Host "sl run" -ForegroundColor Cyan -NoNewLine -Write-Host " to start." -ForegroundColor White -NoNewLine \ No newline at end of file +Write-Host " to start." -ForegroundColor White -NoNewLine