Skip to content

Commit a120b36

Browse files
StartAutomatingStartAutomating
authored andcommitted
Join-PipeScript: Improving Unnamed end block behavior (Fixes #363)
1 parent 8702c91 commit a120b36

File tree

1 file changed

+47
-45
lines changed

1 file changed

+47
-45
lines changed

docs/Requires.md

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
Requires
22
--------
3+
4+
5+
6+
37
### Synopsis
48
requires one or more modules, variables, or types.
59

10+
11+
612
---
13+
14+
715
### Description
816

917
Requires will require on or more modules, variables, or types to exist.
1018

19+
20+
1121
---
22+
23+
1224
### Examples
1325
#### EXAMPLE 1
1426
```PowerShell
@@ -20,170 +32,160 @@ requires latest pipescript # will require the latest version of pipescript
2032
requires variable $pid $sid # will error, because there is no $sid
2133
```
2234

35+
36+
2337
---
38+
39+
2440
### Parameters
2541
#### **Module**
2642

2743
One or more required modules.
2844

2945

3046

31-
> **Type**: ```[Object]```
3247

33-
> **Required**: false
3448

35-
> **Position**: named
3649

37-
> **PipelineInput**:true (ByPropertyName)
50+
|Type |Required|Position|PipelineInput |
51+
|----------|--------|--------|---------------------|
52+
|`[Object]`|false |named |true (ByPropertyName)|
3853

3954

4055

41-
---
4256
#### **Latest**
4357

4458
If set, will require the latest version of a module.
4559

4660

4761

48-
> **Type**: ```[Switch]```
4962

50-
> **Required**: false
5163

52-
> **Position**: named
5364

54-
> **PipelineInput**:true (ByPropertyName)
65+
|Type |Required|Position|PipelineInput |
66+
|----------|--------|--------|---------------------|
67+
|`[Switch]`|false |named |true (ByPropertyName)|
5568

5669

5770

58-
---
5971
#### **ModuleLoader**
6072

6173
A ModuleLoader script can be used to dynamically load unresolved modules.
6274
This script will be passed the unloaded module as an argument, and should return a module.
6375

6476

6577

66-
> **Type**: ```[ScriptBlock]```
6778

68-
> **Required**: false
6979

70-
> **Position**: named
7180

72-
> **PipelineInput**:true (ByPropertyName)
81+
|Type |Required|Position|PipelineInput |Aliases |
82+
|---------------|--------|--------|---------------------|----------------------------------------------------|
83+
|`[ScriptBlock]`|false |named |true (ByPropertyName)|ModuleResolver<br/>Module Loader<br/>Module Resolver|
7384

7485

7586

76-
---
7787
#### **Type**
7888

7989
One or more required types.
8090

8191

8292

83-
> **Type**: ```[Object]```
8493

85-
> **Required**: false
8694

87-
> **Position**: named
8895

89-
> **PipelineInput**:true (ByPropertyName)
96+
|Type |Required|Position|PipelineInput |
97+
|----------|--------|--------|---------------------|
98+
|`[Object]`|false |named |true (ByPropertyName)|
9099

91100

92101

93-
---
94102
#### **TypeLoader**
95103

96104
A TypeLoader script can be used to dynamically load unresolved types.
97105
This script will be passed the unloaded type as an argument.
98106

99107

100108

101-
> **Type**: ```[ScriptBlock]```
102109

103-
> **Required**: false
104110

105-
> **Position**: named
106111

107-
> **PipelineInput**:true (ByPropertyName)
112+
|Type |Required|Position|PipelineInput |Aliases |
113+
|---------------|--------|--------|---------------------|----------------------------------------------|
114+
|`[ScriptBlock]`|false |named |true (ByPropertyName)|TypeResolver<br/>Type Loader<br/>Type Resolver|
108115

109116

110117

111-
---
112118
#### **Variables**
113119

114120
One or more required variables.
115121

116122

117123

118-
> **Type**: ```[Object]```
119124

120-
> **Required**: false
121125

122-
> **Position**: named
123126

124-
> **PipelineInput**:true (ByPropertyName)
127+
|Type |Required|Position|PipelineInput |Aliases |
128+
|----------|--------|--------|---------------------|--------|
129+
|`[Object]`|false |named |true (ByPropertyName)|Variable|
125130

126131

127132

128-
---
129133
#### **VariableLoader**
130134

131135
A VariableLoader script can be used to dynamically load unresolved variable.
132136
This script will be passed the unloaded variable as an argument.
133137

134138

135139

136-
> **Type**: ```[ScriptBlock]```
137140

138-
> **Required**: false
139141

140-
> **Position**: named
141142

142-
> **PipelineInput**:true (ByPropertyName)
143+
|Type |Required|Position|PipelineInput |Aliases |
144+
|---------------|--------|--------|---------------------|----------------------------------------------------------|
145+
|`[ScriptBlock]`|false |named |true (ByPropertyName)|VariableResolver<br/>Variable Loader<br/>Variable Resolver|
143146

144147

145148

146-
---
147149
#### **CommandAst**
148150

149151
The Command AST. This will be provided when using the transpiler as a keyword.
150152

151153

152154

153-
> **Type**: ```[CommandAst]```
154155

155-
> **Required**: true
156156

157-
> **Position**: named
158157

159-
> **PipelineInput**:true (ByValue)
158+
|Type |Required|Position|PipelineInput |
159+
|--------------|--------|--------|--------------|
160+
|`[CommandAst]`|true |named |true (ByValue)|
160161

161162

162163

163-
---
164164
#### **ScriptBlock**
165165

166166
The ScriptBlock. This will be provided when using the transpiler as an attribute.
167167

168168

169169

170-
> **Type**: ```[ScriptBlock]```
171170

172-
> **Required**: true
173171

174-
> **Position**: named
175172

176-
> **PipelineInput**:true (ByValue)
173+
|Type |Required|Position|PipelineInput |
174+
|---------------|--------|--------|--------------|
175+
|`[ScriptBlock]`|true |named |true (ByValue)|
176+
177+
177178

178179

179180

180181
---
182+
183+
181184
### Syntax
182185
```PowerShell
183186
Requires [-Module <Object>] [-Latest] [-ModuleLoader <ScriptBlock>] [-Type <Object>] [-TypeLoader <ScriptBlock>] [-Variables <Object>] [-VariableLoader <ScriptBlock>] -CommandAst <CommandAst> [<CommonParameters>]
184187
```
185188
```PowerShell
186189
Requires [-Module <Object>] [-Latest] [-ModuleLoader <ScriptBlock>] [-Type <Object>] [-TypeLoader <ScriptBlock>] [-Variables <Object>] [-VariableLoader <ScriptBlock>] -ScriptBlock <ScriptBlock> [<CommonParameters>]
187190
```
188-
---
189191

0 commit comments

Comments
 (0)