Templates/NewModule/plasterManifest.xml
<?xml version="1.0" encoding="utf-8"?> <plasterManifest schemaVersion="0.4" xmlns="http://www.microsoft.com/schemas/PowerShell/Plaster/v1"> <metadata> <id>81239986-7a03-45b6-9a5c-9fa48f9841b6</id> <name>OmniNewModule</name> <title>Omni's New Module</title> <author>omniomi</author> <description>Scaffolds the files required for a PowerShell module. This is modified from one of the official examples.</description> <version>1.1.0</version> <tags>Module, ModuleManifest, Build</tags> </metadata> <parameters> <parameter name='ModuleName' type='text' prompt='Enter the name of the module'/> <parameter name='ModuleDesc' type='text' prompt='Enter a description of the module (required for publishing to the PowerShell Gallery)'/> <parameter name='Version' type='text' prompt='Enter the version number of the module' default='0.1.0'/> <parameter name='FullName' type='user-fullname' prompt='Enter your full name' store='text' /> <parameter name='License' type='choice' prompt='Select a license (see http://choosealicense.com for help choosing):' default='0' store='text'> <choice label='&None' help="No license." value="None"/> <choice label='&Apache' help="Adds an Apache license file." value="Apache"/> <choice label='&MIT' help="Adds an MIT license file." value="MIT"/> </parameter> <parameter name='Options' type='multichoice' prompt='Select one or more of the following tooling options:' default='1,2,3,4' store='text' > <choice label='&None' help="No tooling options specified." value="None"/> <choice label='Add &Git .gitignore file' help="Adds a .gitignore file." value="Git"/> <choice label='Add p&sake build script' help="Adds psake build script that generates the module directory for publishing to the PowerShell Gallery." value="psake"/> <choice label='Add &Pester test support' help="Adds test directory and Pester test for the module manifest file." value="Pester"/> <choice label='Add PSScript&Analyzer support' help="Adds script analysis support using PSScriptAnalyzer." value="PSScriptAnalyzer"/> <choice label='Add plat&yPS help generation support' help="Adds help build support using platyPS." value="platyPS"/> </parameter> <parameter name='Errors' type='choice' prompt='Create [Error] class?' default='0' store='text' > <choice label='&No' help="No" value="No"/> <choice label='&Yes' help="A file containing an [Error] class will be created in the Classes folder." value="Yes"/> </parameter> <parameter name='Localization' type='choice' prompt='Include localization (multilingual support)?' default='0' store='text' > <choice label='&No' help="No" value="No"/> <choice label='&Yes' help="Yes" value="Yes"/> </parameter> <parameter name='Editor' type='choice' prompt='Select one of the supported script editors for better editor integration (or None):' default='0' store='text' > <choice label='&None' help="No editor specified." value="None"/> <choice label='Visual Studio &Code' help="Your editor is Visual Studio Code." value="VSCode"/> </parameter> </parameters> <content> <message> Scaffolding your PowerShell Module... </message> <newModuleManifest destination='src\${PLASTER_PARAM_ModuleName}.psd1' moduleVersion='$PLASTER_PARAM_Version' rootModule='${PLASTER_PARAM_ModuleName}.psm1' author='$PLASTER_PARAM_FullName' description='$PLASTER_PARAM_ModuleDesc' encoding='UTF8-NoBOM'/> <file condition='$PLASTER_PARAM_Options -contains "Git"' source='_gitignore' destination='.gitignore' /> <file condition='$PLASTER_PARAM_Options -contains "psake"' source='build*.ps1' destination='' /> <file source='ReleaseNotes.md' destination=''/> <templateFile source='src\Module.psm1' destination='src\${PLASTER_PARAM_ModuleName}.psm1'/> <file source='ScriptAnalyzerSettings.psd1' destination=''/> <file source='' destination='src\Public'/> <file source='' destination='src\Private'/> <file source='' destination='src\Classes'/> <templateFile condition='$PLASTER_PARAM_Errors -eq "yes"' source='src\Classes\Module.Errors.ps1' destination='src\Classes\${PLASTER_PARAM_ModuleName}.Errors.ps1' /> <file condition='$PLASTER_PARAM_Localization -eq "yes"' source='' destination='src\en-US' /> <file condition='$PLASTER_PARAM_Localization -eq "yes"' source='src\en-US\Module.Localization.psd1' destination='src\en-US\${PLASTER_PARAM_ModuleName}.Localization.psd1' /> <templateFile condition="$PLASTER_PARAM_Options -contains 'platyPS'" source='docs\en-US\about_Module.help.md' destination='docs\en-US\about_${PLASTER_PARAM_ModuleName}.help.md'/> <templateFile condition="$PLASTER_PARAM_Options -notcontains 'platyPS'" source='docs\en-US\about_Module.help.txt' destination='src\en-US\about_${PLASTER_PARAM_ModuleName}.help.txt'/> <templateFile condition="$PLASTER_PARAM_Options -contains 'Pester'" source='test\Module.T.ps1' destination='test\${PLASTER_PARAM_ModuleName}.Tests.ps1' /> <templateFile condition="$PLASTER_PARAM_Options -contains 'Pester'" source='test\Shared.ps1' destination='test\Shared.ps1' /> <templateFile condition="$PLASTER_PARAM_License -eq 'Apache'" source='license\Apache.txt' destination='LICENSE.txt' encoding="UTF8-NoBOM"/> <templateFile condition="$PLASTER_PARAM_License -eq 'MIT'" source='license\MIT.txt' destination='LICENSE.txt' /> <file condition="($PLASTER_PARAM_Editor -eq 'VSCode') -and ($PLASTER_PARAM_Options -notcontains 'psake') -and ($PLASTER_PARAM_Options -contains 'Pester')" source='editor\VSCode\tasks_pester.json' destination='.vscode\tasks.json' /> <file condition="($PLASTER_PARAM_Editor -eq 'VSCode') -and ($PLASTER_PARAM_Options -contains 'psake') -and ($PLASTER_PARAM_Options -notcontains 'Pester')" source='editor\VSCode\tasks_psake.json' destination='.vscode\tasks.json' /> <file condition="($PLASTER_PARAM_Editor -eq 'VSCode') -and ($PLASTER_PARAM_Options -contains 'psake') -and ($PLASTER_PARAM_Options -contains 'Pester')" source='editor\VSCode\tasks_psake_pester.json' destination='.vscode\tasks.json' /> <file condition="($PLASTER_PARAM_Editor -eq 'VSCode') -and ($PLASTER_PARAM_Options -contains 'PSScriptAnalyzer')" source='editor\VSCode\settings.json' destination='.vscode\settings.json' /> <requireModule name="Pester" condition='$PLASTER_PARAM_Options -contains "Pester"' minimumVersion="3.4.0" message="Without Pester, you will not be able to run the provided Pester test to validate your module manifest file.`nWithout version 3.4.0, VS Code will not display Pester warnings and errors in the Problems panel."/> <requireModule name="psake" condition='$PLASTER_PARAM_Options -contains "psake"' message="Without psake, you will not be able to run the provided build script to build and/or publish your module."/> <requireModule name="PSScriptAnalyzer" condition='$PLASTER_PARAM_Options -contains "PSScriptAnalyzer"' message="Without PSScriptAnalyzer, you will not be able to perform script analysis, or use the provided options to control script analysis."/> <requireModule name="platyPS" condition='$PLASTER_PARAM_Options -contains "platyPS"' minimumVersion="0.7.2" message="Without platyPS, you will not be able to generate PowerShell external help for your module using markdown."/> <message> Your new PowerShell module project '$PLASTER_PARAM_ModuleName' has been created. </message> <message condition="$PLASTER_PARAM_Options -contains 'Pester'"> A Pester test has been created to validate the module's manifest file. Add additional tests to the test directory. You can run the Pester tests in your project by executing the 'test' task. Press Ctrl+P, then type 'task test'. </message> <message condition="$PLASTER_PARAM_Options -contains 'psake'"> You can build your project by executing the 'build' task. Press Ctrl+P, then type 'task build'. You can publish your project to the PSGallery by pressing Ctrl+P, then type 'task publish'. </message> <message condition="($PLASTER_PARAM_Options -contains 'psake') -and ($PLASTER_PARAM_Options -contains 'platyPS')"> You can generate help and additional documentation using platyPS by running the 'build help' task. Press Ctrl+P, then type 'task build help'. Add additional documentation written in platyPS markdown to the docs directory. You can update the help by running the 'build help' task again. </message> </content> </plasterManifest> |