Skip to content

Commit 8718fd9

Browse files
committed
updated readme
1 parent be9bfd7 commit 8718fd9

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Use this template to quickly bootstrap new PowerShell module projects with indus
1212
- Pre-configured module structure
1313
- Easy building and testing with make
1414
- Pester testing framework integration
15+
- Dependency management with PSDepend
1516
- GitHub Actions CI/CD workflows
1617
- C# class support
1718
- Automatic documentation
@@ -48,6 +49,14 @@ This creates a folder with the repository name, housing the module files/folders
4849
make setup
4950
```
5051

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+
5160
### Perform a build
5261

5362
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.
6271
make pester
6372
```
6473

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+
6591
## Custom Scripts
6692

6793
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
116142

117143
## Acknowledgments
118144

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

Comments
 (0)