Skip to content

Commit 6355eb5

Browse files
StartAutomatingStartAutomating
authored andcommitted
Updating /Transpilers/Templates/README.ps1.md (updating contibuting section) (re #285)
1 parent 002a662 commit 6355eb5

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Transpilers/Templates/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ PipeScript can be used to generate 40 languages or file types.
5555
If you would like to add support for writing a language with PipeScript, this is the place to put it.
5656

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

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

64-
Transpilers should call ```.>PipeScript.Inline``` to simplify and standarize processing.
65+
If $AsTemplateObject is passed, these parameters should be returned directly.
66+
Otherwise, the template transpiler should call ```.>PipeScript.Template```.
6567

6668

6769

0 commit comments

Comments
 (0)