From e33436cc12caee68a83dedfefd1cf5ca916bbd98 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 31 May 2024 06:46:50 +0000 Subject: [PATCH] feat: Use-Module ( Fixes #1130 ) Fixing parameters and fulfilling promise --- Transpilers/README.md | 71 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/Transpilers/README.md b/Transpilers/README.md index 869e6eab6..31fa7afa5 100644 --- a/Transpilers/README.md +++ b/Transpilers/README.md @@ -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 +~~~ +