Skip to content

Templates in PipeScript #285

@StartAutomating

Description

@StartAutomating

PipeScript can be great for templating, and it's about to get a lot better.

Prior to PipeScript 0.2, templates were called "Inline Transpilers".

In 0.2 and beyond, templates are templates, and the transpilers that help templatize a given language are "template transpilers".

Beyond that, templates can now be used interactively with a command whose first or second element is 'template'

This can be written several ways

# The full name of the language can come first
javascript template $content  
# a valid file extension can also start things off
.js template $content 
# template can also be followed by a language
template Markdown $content
# or template can be followed by an extension
template .md $content

What all of these examples do is roughly the same:

They transform into PowerShell code that will create an object that can evaluate a template of that language.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions