Skip to content

Commit 2a210d3

Browse files
StartAutomatingStartAutomating
authored andcommitted
Updating PipeScript.HelpOut.ps1 (including topics, re #132)
1 parent 00f085c commit 2a210d3

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

docs/README.ps1.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
1-
This directory and it's subdirectories contain additional language keywords within PipeScript.
1+
This directory contains Inline PipeScript transpilers for several languages.
22

3-
Most keywords will be implemented as a Transpiler that tranforms a CommandAST.
3+
PipeScript can currently be embedded in ```.>{@(Get-Transpiler -TranspilerPath $pwd).Count}<.``` languages or file types.
4+
5+
Transpilers in this directory should be named ```Inline.NameOfLanguage.psx.ps1```.
6+
Each file should handle one and only one language (better explicit than terse).
7+
8+
Transpilers should call ```.>PipeScript.Inline``` to simplify and standarize processing.
49

510
~~~PipeScript{
611
[PSCustomObject]@{
712
Table = Get-Transpiler -TranspilerPath $pwd |
8-
Select-Object DisplayName, Synopsis, @{
13+
Select-Object @{
14+
Name='Language'
15+
Expression= {$_.DisplayName -replace '^Inline\.'}
16+
}, @{
17+
Name='Synopsis'
18+
Expression= { $_.Synopsis -replace '[\s\r\n]+$' }
19+
}, @{
920
Name='Link'
1021
Expression = { $_.Name }
1122
}
12-
}}
13-
~~~
14-
15-
16-
~~~PipeScript{
17-
@(foreach ($transpiler in Get-Transpiler -TranspilerPath $pwd) {
18-
$examples = @($transpiler.Examples)
19-
if (-not $examples) { continue }
20-
for ($exampleNumber = 1; $exampleNumber -le $examples.Length; $exampleNumber++) {
21-
@("## $($transpiler.DisplayName) Example $($exampleNumber)",
22-
[Environment]::Newline,
23-
"~~~PowerShell",
24-
$examples[$exampleNumber - 1],
25-
"~~~") -join [Environment]::Newline
26-
}
27-
}) -join ([Environment]::Newline * 2)
23+
}
2824
}
2925
~~~

0 commit comments

Comments
 (0)