With all the components introduced, we can use the template structure for our module development:
- ModuleName\Public
- Contains all publicly visible module functions
- Each function is in a separate script, called NameOfFunction.ps1
- ModuleName\Private
- Contains all internally visible functions
- Each function is in a separate script, called NameOfFunction.ps1
- ModuleName\Types
- Contains all .NET/PowerShell classes the module requires
- ModuleName\ModuleName.psm1
- Your script module
- ModuleName\ModuleName.psd1
- Your module manifest
- Test
- Contains all unit and integration tests to execute, possibly sorted into subfolders
- Usually one *.Test.ps1 file per function
- ModuleName.psdeploy.ps1
- appveyor.yml
- build.ps1
- psake.ps1
- README.md
- LICENSE
As the central entry point, the build script kicks off your deployment process. We like to use Psake and PSDeploy...