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
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Use this template to quickly bootstrap new PowerShell module projects with indus
12
12
- Pre-configured module structure
13
13
- Easy building and testing with make
14
14
- Pester testing framework integration
15
+
- Dependency management with PSDepend
15
16
- GitHub Actions CI/CD workflows
16
17
- C# class support
17
18
- Automatic documentation
@@ -48,6 +49,14 @@ This creates a folder with the repository name, housing the module files/folders
48
49
make setup
49
50
```
50
51
52
+
### Installing dependencies
53
+
54
+
This installs any required modules defined in `PSDepend.psd1` at the root of your repository.
55
+
If no `PSDepend.psd1` file exists, this step is skipped gracefully.
56
+
```bash
57
+
make depend
58
+
```
59
+
51
60
### Perform a build
52
61
53
62
This builds a nupkg from your source code into the .output folder.
@@ -62,6 +71,23 @@ This runs all pester tests against the built module.
62
71
make pester
63
72
```
64
73
74
+
## Dependencies
75
+
76
+
Module dependencies are managed using [PSDepend](https://github.com/RamblingCookieMonster/PSDepend).
77
+
To declare dependencies, create or edit the `PSDepend.psd1` file in the root of your repository.
78
+
79
+
A simple example that installs the latest version of a module from PSGallery:
80
+
```powershell
81
+
@{
82
+
'Microsoft.PowerShell.ConsoleGuiTools' = 'latest'
83
+
}
84
+
```
85
+
86
+
You can also pin versions, use hashtable format for more control, or pull from Git repositories.
87
+
See the comments in the included `PSDepend.psd1` template for all supported options.
88
+
89
+
Any modules listed in `PSDepend.psd1` should also be added to `RequiredModules` in your module manifest so that PowerShell enforces the dependency at import time.
90
+
65
91
## Custom Scripts
66
92
67
93
For advanced scenarios that fall outside the standard module build process, two custom scripts are available.
@@ -116,4 +142,4 @@ Copyright (c) 2026 James D'Arcy Ryan
116
142
117
143
## Acknowledgments
118
144
119
-
Thank you to all contributors who help improve this template!
145
+
Thank you to all contributors who help improve this template!
0 commit comments