Skip to content

Commit 93affe0

Browse files
StartAutomatingStartAutomating
authored andcommitted
Updating PipeScript.HelpOut.ps1 (including topics, re #132)
1 parent 630f25a commit 93affe0

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

docs/README.ps1.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
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+
~~~

0 commit comments

Comments
 (0)