Skip to content

Commit 199216c

Browse files
authored
Merge pull request microsoft#201306 from microsoft/tyriar/xterm_improvements
Add script for easy symlinking a local xterm repo
2 parents 75b1639 + e3c70a4 commit 199216c

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

scripts/update-xterm.ps1

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/xterm-symlink.ps1

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<#
2+
.SYNOPSIS
3+
Symlinks ./node_modules/xterm to provided $XtermFolder.
4+
#>
5+
6+
Param(
7+
[Parameter(Mandatory=$True)]
8+
$XtermFolder
9+
)
10+
11+
$TargetFolder = "./node_modules/@xterm/xterm"
12+
13+
if (Test-Path $TargetFolder -PathType Container)
14+
{
15+
Write-Host -ForegroundColor Green ":: Deleting $TargetFolder`n"
16+
Remove-Item -Path $TargetFolder
17+
}
18+
19+
if (Test-Path $XtermFolder -PathType Container)
20+
{
21+
Write-Host -ForegroundColor Green "`n:: Creating symlink $TargetFolder -> $XtermFolder`n"
22+
New-Item -Path $TargetFolder -ItemType SymbolicLink -Value $XtermFolder
23+
24+
Write-Host -ForegroundColor Green "`n:: Packaging xterm.js`n"
25+
Set-Location $TargetFolder
26+
yarn package -- --mode development
27+
Set-Location -
28+
29+
Write-Host -ForegroundColor Green "`n:: Finished! To watch changes, open the VS Code terminal in the xterm.js repo and run:`n`n yarn package -- --mode development --watch"
30+
}
31+
else
32+
{
33+
Write-Error -ForegroundColor Red "`n:: $XtermFolder is not a valid folder"
34+
}
File renamed without changes.

scripts/xterm-update.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node $PSScriptRoot\xterm-update.js (Get-Location)

0 commit comments

Comments
 (0)