Skip to content

Commit 31e1724

Browse files
StartAutomatingStartAutomating
authored andcommitted
Update-PipeScript: Adding -RegionReplacement and Examples (Fixes #179)
1 parent 2bc1d05 commit 31e1724

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/Update-PipeScript.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,30 @@ Update-PipeScript is used by PipeScript transpilers in order to make a number of
1313

1414
It can also be used interactively to transform scripts or text in a number of ways.
1515

16+
---
17+
### Examples
18+
#### EXAMPLE 1
19+
```PowerShell
20+
Update-PipeScript -ScriptBlock {
21+
param($x,$y)
22+
} -RemoveParameter x
23+
```
24+
25+
#### EXAMPLE 2
26+
```PowerShell
27+
Update-PipeScript -RenameVariable @{x='y'} -ScriptBlock {$x}
28+
```
29+
30+
#### EXAMPLE 3
31+
```PowerShell
32+
Update-PipeScript -ScriptBlock {
33+
#region MyRegion
34+
1
35+
#endregion MyRegion
36+
2
37+
} -RegionReplacement @{MyRegion=''}
38+
```
39+
1640
---
1741
### Parameters
1842
#### **ScriptBlock**

0 commit comments

Comments
 (0)