Skip to content

Commit

Permalink
feat: Use-Module ( Fixes #1130 )
Browse files Browse the repository at this point in the history
    Fixing parameters and fulfilling promise
  • Loading branch information
StartAutomating authored and StartAutomating committed May 31, 2024
1 parent 5473e13 commit e33436c
Showing 1 changed file with 68 additions and 3 deletions.
71 changes: 68 additions & 3 deletions Transpilers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,81 @@ All the module needs to do for the transpilers to be recognized by PipeScript is
This directory includes uncategorized or 'common' transpilers.


|Table|
|-----|
||
|DisplayName |Synopsis |
|----------------------------|---------------------------------------|
|[Decorate](Decorate.psx.ps1)|[decorate transpiler](Decorate.psx.ps1)|
|[Define](Define.psx.ps1) |[Defines a variable](Define.psx.ps1) |
|[Include](Include.psx.ps1) |[Includes Files](Include.psx.ps1) |



### Examples

#### Decorate Example 1


~~~PowerShell
{
$v = [PSCustomObject]@{}
[decorate('MyTypeName',Clear,PassThru)]$v
}.Transpile()
~~~

#### Define Example 1


~~~PowerShell
{
[Define(Value={Get-Random})]$RandomNumber
}.Transpile()
~~~

#### Define Example 2


~~~PowerShell
{
[Define(Value={$global:ThisValueExistsAtBuildTime})]$MyVariable
}.Transpile()
~~~

#### Include Example 1


~~~PowerShell
{
[Include("Invoke-PipeScript")]$null
} | .>PipeScript
~~~

#### Include Example 2


~~~PowerShell
{
[Include("Invoke-PipeScript")]
param()
} | .>PipeScript
~~~

#### Include Example 3


~~~PowerShell
{
[Include('*-*.ps1')]$psScriptRoot
} | .>PipeScript
~~~

#### Include Example 4


~~~PowerShell
{
[Include('https://pssvg.start-automating.com/Examples/PowerShellChevron.svg')]$PSChevron
} | .>PipeScript
~~~




0 comments on commit e33436c

Please sign in to comment.