Skip to content

Commit 002a662

Browse files
author
James Brundage
committed
Updating /Transpilers/Templates/README.ps1.md (updating contibuting section) (re #285)
1 parent 8d2636d commit 002a662

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Transpilers/Templates/README.ps1.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ PipeScript can be used to generate ```.>{@(Get-Transpiler -TranspilerPath $pwd).
2828
If you would like to add support for writing a language with PipeScript, this is the place to put it.
2929

3030
Transpilers in this directory should:
31-
* Be named ```Inline.NameOfLanguage.psx.ps1```.
32-
* Accept ```[Management.Automation.CommandInfo]``` as a pipeline parameter.
33-
* Use ```[ValidateScript({})]``` or ```[ValidatePattern()]``` to ensure that the correct file type is targeted.
31+
* Be named `NameOfLanguage.Template.psx.ps1`.
32+
* Accept `[Management.Automation.CommandInfo]` as a pipeline parameter, in it's own parameter set
33+
* Accept `[switch]$AsTemplateObject` as a mandatory parameter in it's own parameter set.
34+
* Use `[ValidatePattern()]` to ensure that the correct file type is targeted.
3435

35-
Each file should handle one and only one language (better explicit than terse).
36+
The template transpiler will then create a set of parameters to PipeScript.Template.
3637

37-
Transpilers should call ```.>PipeScript.Inline``` to simplify and standarize processing.
38+
If $AsTemplateObject is passed, these parameters should be returned directly.
39+
Otherwise, the template transpiler should call ```.>PipeScript.Template```.
3840

3941

4042

0 commit comments

Comments
 (0)