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: src/content/docs/en-us/guides/create/create-extension-package.mdx
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,15 @@ As we've mentioned in other articles, a Chocolatey package can do near anything
12
12
13
13
In this how-to, we'll talk about sharing functions between packages using extension packages.
14
14
15
+
### Back To Basics Livestream
16
+
17
+
The creation, and usage, of Chocolatey extension packages was a topic of a recent [back-to-basics](https://blog.chocolatey.org/tags/back-to-basics) livestream.
18
+
The recording of that livestream can be found here:
In Chocolatey-parlance, an extension package is a package that extends the ability of other Chocolatey packages, by making additional PowerShell functions or cmdlets available.
Chocolatey packages are stored within the `lib` folder, of the Chocolatey installation location.
188
+
This is the `C:\ProgramData\chocolatey\lib` folder by default.
189
+
However, Chocolatey CLI understands packages that end with `.extension` and some additional processing is completed.
190
+
The actual extension package contents will be extracted, and stored, in the `C:\ProgramData\chocolatey\extensions` directory.
191
+
The name of the folder will match the name you gave to the extension package.
192
+
193
+
For example, an extension package with the name `chocolatey-windowsupdate.extension`, will, by default, have the package contents extracted to `C:\ProgramData\chocolatey\extensions\chocolatey-windowsupdate`.
194
+
195
+
This special handling for packages ending with `.extension` also applies to packages that end with `.hook` and `.template`.
196
+
For `.hook` packages, by default, there is a folder at `C:\ProgramData\chocolatey\hooks`.
197
+
For `.template` packages, by default, there is a folder at `C:\ProgramData\chocolatey\templates`.
198
+
199
+
176
200
### Using Shared PowerShell Functions
177
201
178
202
Once you've created your extension package, using the functions contained within is as simple as ensuring the package is installed (for instance, by adding a dependency) and calling the functions within your Chocolatey scripts.
0 commit comments