A Plaster template for automating the scaffolding of a new PowerShell module.
Plaster GitHub repository: https://github.com/PowerShellOrg/Plaster
$manifestProperties = @{
Path = 'C:\tmp\PlasterManifest\PlasterManifest.xml'
TemplateName = 'ScriptModuleTemplate'
TemplateType = 'Project'
Title = 'New PowerShell Module'
Author = 'Morten Johansen'
Description = 'Scaffolds the files required for a PowerShell script module'
Tags = 'PowerShell, Module, ModuleManifest'
}
$Folder = Split-Path -Path $manifestProperties.Path -Parent
if (-not(Test-Path -Path $Folder -PathType Container)) {
New-Item -Path $Folder -ItemType Directory | Out-Null
}
New-PlasterManifest @manifestProperties
Invoke-Plaster -TemplatePath C:\tmp\PlasterManifest\ -DestinationPath C:\tmp\AwesomeModule -Verbose
- Clone the repository down to your harddrive.
git clone https://github.com/mojoaar/plastermoduletemplate.git
- Call Plaster with the path where you cloned the repository.
Invoke-Plaster -TemplatePath X:\github\plastermoduletemplate\ModuleTemplate -DestinationPath X:\test -Verbose
- You will end up with a folder structure like shown below.
Root
–Modulefolder
--public
--private