Skip to content

Commit 2057602

Browse files
committed
Updated Readme.MD and the comment based help
1 parent d5fac2f commit 2057602

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
as PSModuleBuild will read in all .ps1 files and put them in but if you'd like to make sure these commands are run at
3939
the beginning of the file you can.
4040

41+
Public/Private Functions
42+
========================
43+
PSModuleBuild will support public and private functions as well. In your project folder create a Public folder and a Private
44+
folder and place your function files appropriately.
45+
4146

4247
#EXAMPLES
4348
Simple
@@ -73,7 +78,8 @@
7378
--------------------------------------
7479
If you have about files, or additional XML descriptor files, PSModuleBuild will support that. First create a project folder,
7580
then create a source folder and place all of your function files in there. Now create another folder with the name of your
76-
module (we'll use NewModule in this example) and place all of your files in them in the proper folder structure.
81+
module (we'll use NewModule in this example) and place your about files, and other files there, in the proper folder structure
82+
(en-US, etc).
7783

7884
$BuildSplat = @{
7985
Path = "c:\ProjectFolder\Source"
@@ -104,6 +110,24 @@
104110
Passthru = $true
105111
}
106112
Invoke-PSModuleBuild @BuildSplat
113+
114+
115+
Advanced - Mulitple Target Paths
116+
--------------------------------
117+
Need to deploy the module to multiple paths? Maybe you have a primary production location but also a process running
118+
in a DMZ?
119+
120+
$BuildSplat = @{
121+
Path = "c:\ProjectFolder\NewModule\Source"
122+
TargetPath = "c:\ProjectFolder\NewModule","\\dmzserver\share\Modules\NewModule" #this is optional now, Invoke-PSModuleBuild goes here by default
123+
ModuleName = "NewModule"
124+
Author = "@thesurlyadm1n"
125+
Description = "This is that new module I've been working on"
126+
ProjectURI = "https://github.com/martin9700/PSModuleBuild"
127+
ReleaseNotes = (git log -1 --pretty=%s) | Out-String #Pull release notes from your git commits
128+
Passthru = $true
129+
}
130+
Invoke-PSModuleBuild @BuildSplat
107131

108132

109133
#SEE ALSO

Source/Invoke-PSModuleBuild.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ Function Invoke-PSModuleBuild {
1717
^build\.ps1$
1818
\.psdeploy\.
1919
20+
Public and private functions are also support by creating the proper folder structure:
21+
22+
\Source
23+
\Public
24+
\Private
25+
2026
If you have any scripts or cmdlets that need to be run at Import-Module time, you can put them in an Include.txt
2127
file and PSModuleBuild will read this file first and put it in the module file first. This is not strictly needed
2228
as PSModuleBuild will read in all .ps1 files and put them in but if you'd like to make sure these commands are run at
@@ -27,7 +33,9 @@ Function Invoke-PSModuleBuild {
2733
The path where you module folders and PS1 files containing your functions is located.
2834
2935
.PARAMETER TargetPath
30-
The path where you want the module and manifest files to be located. If it does not exist Invoke-PSModuleBuild will create it.
36+
The path where you want the module and manifest files to be located. If the folder does not exist Invoke-PSModuleBuild will create it, if
37+
it is not designated it will use the Path location. Multiple folder paths can be designated as well if you want to deploy to multiple
38+
locations.
3139
3240
.PARAMETER ModuleName
3341
What you want to call your module. By default the module will be named after the folder you point
@@ -79,6 +87,7 @@ Function Invoke-PSModuleBuild {
7987
1.0.13 Removed a debugging line.
8088
1.0.14 Rename to Invoke-PSModuleBuild and create module named PSModuleBuild. Added ReleaseNotes support (New and Update-ModuleManifest treat ReleaseNotes differently)
8189
1.0.15 Updated comment based help
90+
1.1 Added multiple target paths
8291
.LINK
8392
https://github.com/martin9700/PSModuleBuild
8493
#>

0 commit comments

Comments
 (0)