Skip to content

Commit 72fa567

Browse files
committed
(doc) Update Extension package docs
To include link to Back to Basics livestream, where this information was discussed, as well as to add an additional section about where the extension package files are extracted to.
1 parent 2eff204 commit 72fa567

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/content/docs/en-us/guides/create/create-extension-package.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ As we've mentioned in other articles, a Chocolatey package can do near anything
1212

1313
In this how-to, we'll talk about sharing functions between packages using extension packages.
1414

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:
19+
20+
<div class="ratio ratio-16x9 mb-3">
21+
<iframe width="560" height="315" src="https://www.youtube.com/embed/J43T3QArbNE" frameborder="0" allowfullscreen></iframe>
22+
</div>
23+
1524
### What Is an Extension Package
1625

1726
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.
@@ -175,6 +184,21 @@ Get-ChildItem $env:ChocolateyInstall\extensions
175184
Get-ChildItem $env:ChocolateyInstall\extensions\example
176185
```
177186

187+
### Where are extensions stored?
188+
189+
Chocolatey packages are stored within the `lib` folder, of the Chocolatey installation location.
190+
This is the `C:\ProgramData\chocolatey\lib` folder by default.
191+
However, Chocolatey CLI understands packages that end with `.extension` and some additional processing is completed.
192+
The actual extension package contents will be extracted, and stored, in the `C:\ProgramData\chocolatey\extensions` directory.
193+
The name of the folder will match the name you gave to the extension package.
194+
195+
For example, an extension package with the name `chocolatey-windowsupdate.extension`, will have the package contents extracted to `C:\ProgramData\chocolatey\extensions\chocolatey-windowsupdate`.
196+
197+
This special handling for packages ending with `.extension` also applies to packages that end with `.hook` and `.template`.
198+
For `.hook` packages, there is a folder at `C:\ProgramData\chocolatey\hooks`.
199+
For `.template` packages, there is a folder at `C:\ProgramData\chocolatey\templates`.
200+
201+
178202
### Using Shared PowerShell Functions
179203

180204
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

Comments
 (0)