File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed
Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change 1- Files in this directory and it's subdirectories generate wrappers for PipeScript and PowerShell.
2-
3- These wrappers allow PipeScript or PowerShell to be called from other programming languages.
1+ This directory and it's subdirectories contain syntax changes that enable common programming scenarios in PowerShell and PipeScript.
42
53~~~ PipeScript{
64 [PSCustomObject]@{
75 Table = Get-Transpiler -TranspilerPath $pwd |
8- Select-Object DisplayName, @{
9- Name='Synopsis'
10- Expression= { $_.Synopsis -replace '[\s\r\n]+$' }
11- }, @{
6+ Select-Object DisplayName, Synopsis, @{
127 Name='Link'
138 Expression = { $_.Name }
149 }
15- }
10+ }}
11+ ~~~
12+
13+
14+ ~~~ PipeScript{
15+ @(foreach ($transpiler in Get-Transpiler -TranspilerPath $pwd) {
16+ $examples = @($transpiler.Examples)
17+ if (-not $examples) { continue }
18+ for ($exampleNumber = 1; $exampleNumber -le $examples.Length; $exampleNumber++) {
19+ @("## $($transpiler.DisplayName) Example $($exampleNumber)",
20+ [Environment]::Newline,
21+ "~~~PowerShell",
22+ $examples[$exampleNumber - 1],
23+ "~~~") -join [Environment]::Newline
24+ }
25+ }) -join ([Environment]::Newline * 2)
1626}
17- ~~~
27+ ~~~
You can’t perform that action at this time.
0 commit comments