branch | status |
---|---|
master |
Basic skeleton structure for a new PowerShell module with public and private (not exposed to user) function support, tests, and module manifest.
-Rename all instances of 'PowerShellModuleSkeleton' to < YourProjectName >. -Add new functions to the PowerShellModuleSkeleton\public\ folder, and update the manifest (*.psd1) file with the new functions to export.
To import the module locally without having to copy it to on of the defualt $psmoduleroot paths, navigate to within the module's root direction, and import the module from the current directory:
Import-Module .\
Test-PublicFunction -something 'print something'
Test-PublicFunction -something 'setting the verbose switch will output the same message to the verbose stream, since the [cmdletingbinding()] decorator was used.'
Install the module from PowerShell Gallery:
Install-Module PowerShellModuleSkeleton
Test-PublicFunction
Setting up a build in AzureDevops is trivial, and allows for unit testing with pester and static code analysis using PSSCriptAnalyzer -- followed by a release job that deploys the package to the PowerShell Gallery.
todo: describe setting up build and relase.