|
38 | 38 | 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 |
39 | 39 | the beginning of the file you can. |
40 | 40 |
|
| 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 | + |
41 | 46 |
|
42 | 47 | #EXAMPLES |
43 | 48 | Simple |
|
73 | 78 | -------------------------------------- |
74 | 79 | If you have about files, or additional XML descriptor files, PSModuleBuild will support that. First create a project folder, |
75 | 80 | 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). |
77 | 83 |
|
78 | 84 | $BuildSplat = @{ |
79 | 85 | Path = "c:\ProjectFolder\Source" |
|
104 | 110 | Passthru = $true |
105 | 111 | } |
106 | 112 | 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 |
107 | 131 |
|
108 | 132 |
|
109 | 133 | #SEE ALSO |
|
0 commit comments