Skip to content

Commit 042fd7e

Browse files
committed
add powershell script to sort the plugin json lists
1 parent 7f2f567 commit 042fd7e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

sort_plugin_lists.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
function Sort-Json($file)
2+
{
3+
$a = Get-Content $file | ConvertFrom-Json
4+
$a.'npp-plugins' = $a.'npp-plugins' | sort -Property 'display-name'
5+
$a | ConvertTo-Json > $file
6+
#replace 2 spaces by tab
7+
$content = [IO.File]::ReadAllText($file)
8+
$content = $content -replace ' {2}', "`t"
9+
[IO.File]::WriteAllText($file, $content)
10+
}
11+
12+
Sort-Json ".\src\pl.x64.json"
13+
Sort-Json ".\src\pl.x86.json"
14+
Sort-Json ".\src\pl.arm64.json"
15+

0 commit comments

Comments
 (0)