You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ReadMe.md
+5-2
Original file line number
Diff line number
Diff line change
@@ -98,12 +98,15 @@ For best results, you need to organize your module project similarly to how this
98
98
99
99
1. Create a `source` folder with a `build.psd1` file and your module manifest in it
100
100
2. In the `build.psd1` specify the relative **Path** to your module's manifest, e.g. `@{ Path = "ModuleBuilder.psd1" }`
101
-
3. In your manifest, make sure the `FunctionsToExport` entry is not commented out. You can leave it empty
101
+
3. In your manifest, make sure a few values are not commented out. You can leave them empty, because they'll be overwritten:
102
+
-`FunctionsToExport` will be updated with the _file names_ that match the `PublicFilter`
103
+
-`AliasesToExport` will be updated with the values from `[Alias()]` attributes on commands
104
+
-`Prerelease` and `ReleaseNotes` in the `PSData` hashtable in `PrivateData`
102
105
103
106
Once you start working on the module, you'll create sub-folders in source, and put script files in them with only **one** function in each file. You should name the files with _the same name_ as the function that's in them -- especially in the public folder, where we use the file name (without the extension) to determine the exported functions.
104
107
105
108
1. By convention, use folders named "Classes" (and/or "Enum"), "Private", and "Public"
106
-
2. By convention, the functions in "Public" will be exported from the module
109
+
2. By convention, the functions in "Public" will be exported from the module (you can override the `PublicFilter`)
107
110
3. To force classes to be in a certain order, you can prefix their file names with numbers, like `01-User.ps1`
108
111
109
112
There are a *lot* of conventions in `Build-Module`, expressed as default values for its parameters. These defaults are documented in the help for Build-Module. You can override any parameter to `Build-Module` by passing it, or by adding keys to the `build.psd1` file with your preferences.
0 commit comments