SSPowerShellBoilerplate is an opinionated Plaster template for jump starting Open Source PowerShell projects. This was mainly created for my own personal use, so it may require some tweaking for taste.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to seeminglyscience@gmail.com.
- Supports projects that utilize C#, PowerShell or a combination of both.
- InvokeBuild build script.
- Basic README template, along with boilerplate CONTRIBUTING and CODE_OF_CONDUCT docs and MIT License.
- Strict default style rules.
- VSCode tasks and launch configurations.
Install-Module SSPowerShellBoilerplate -Scope CurrentUser
git clone 'https://github.com/SeeminglyScience/SSPowerShellBoilerplate.git'
Set-Location .\SSPowerShellBoilerplate
Invoke-Build -Task Install
$template = Get-PlasterTemplate -IncludeInstalledModules |
Where-Object TemplatePath -Match 'SSPowerShellBoilerplate'
Invoke-Plaster -TemplatePath $template.TemplatePath
Invoke the template with no parameters. This will prompt for the following information:
- Destination
- Module name
- Language(s) to use
- GitHub username
- Full name (defaults to global git config)
- Email (defaults to global git config)
# Place this in your Microsoft.VSCode_profile.ps1
Register-EditorCommand -Name SSPowerShellBoilerplate -DisplayName 'New Open Source PowerShell Project' -ScriptBlock {
Import-Module SSPowerShellBoilerplate
$templatePath = Join-Path (Get-Module SSPowerShellBoilerplate).ModuleBase SSPowerShellBoilerplate
$plasterParams = @{
TemplatePath = $templatePath
DestinationPath = $psEditor.Workspace.Path
ModuleName = (Split-Path $psEditor.Workspace.Path -Leaf)
GitHubUser = 'MyUserName'
FullName = 'MyFullName'
Email = 'MyEmailAddress'
}
Invoke-Plaster @plasterParams
}
Register an editor command (see Using Editor Commands) that scaffolds a PowerShell project in the current workspace. The only prompt will be what language(s) you want to use, which can also set in the $plasterParams
hashtable.
We would love to incorporate community contributions into this project. If you would like to contribute code, documentation, tests, or bug reports, please read our Contribution Guide to learn more.
- Improve C# support
- Add useful breakpoints to
debugHarness.ps1
- Add template for adding an individual C# class
- Add template for adding a PowerShell function