/zModuleBuild.ps1 Secret
Last active
August 6, 2024 14:22
-
-
Save ngetchell/ec930f1dfcdd7450d1ca to your computer and use it in GitHub Desktop.
zModuleBuild.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We cloned our project to C:\sc\PSStackExchange | |
$Path = 'C:\sc\PSStackExchange' | |
$ModuleName = 'PSStackExchange' | |
$Author = 'RamblingCookieMonster' | |
$Description = 'PowerShell module to query the StackExchange API' | |
# Create the module and private function directories | |
mkdir $Path\$ModuleName | |
mkdir $Path\$ModuleName\Private | |
mkdir $Path\$ModuleName\Public | |
mkdir $Path\$ModuleName\en-US # For about_Help files | |
mkdir $Path\Tests | |
#Create the module and related files | |
New-Item "$Path\$ModuleName\$ModuleName.psm1" -ItemType File | |
New-Item "$Path\$ModuleName\$ModuleName.Format.ps1xml" -ItemType File | |
New-Item "$Path\$ModuleName\en-US\about_$ModuleName.help.txt" -ItemType File | |
New-Item "$Path\Tests\$ModuleName.Tests.ps1" -ItemType File | |
New-ModuleManifest -Path $Path\$ModuleName\$ModuleName.psd1 ` | |
-RootModule $Path\$ModuleName\$ModuleName.psm1 ` | |
-Description $Description ` | |
-PowerShellVersion 3.0 ` | |
-Author $Author ` | |
-FormatsToProcess "$ModuleName.Format.ps1xml" | |
# Copy the public/exported functions into the public folder, private functions into private folder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment