The Forge
module contains a set of tools to automate PowerShell code generation. It
does nothing by itself. Actual generators are published in separate modules named Forge.*
.
Take a look at Forge.Module
a PowerShell
module generator.
Forge
provides support cmdlets that aim at making writing a generator very easy. The most
useful cmdlets are:
New-ForgeDirectory
: generates a new directory in the destination path.Copy-ForgeFile
: copies a file from the template directory to the destination path. If the file is an EPS template, the template will be expanded.Get-ValueOrGitOrDefault
: will return the value passed as an argument or, if the value is absent, it looks ingit config key_name
and return the value. If git is absent or no config exists, it returns the default value passed as an argument.
Find-Module Forge | Install-Module
At run time, the following modules are required:
Install-Module EPS
Additionally, at build time, the following modules are required:
Install-Module Pester
- https://github.com/PowerShell/Plaster
- https://github.com/LaurentDardenne/Template
- https://github.com/zloeber/PSModuleBuild is based on the excelent Invoke-Build module.