Skip to content

Commit ed27e69

Browse files
authored
Merge pull request #1078 from gep13/update-extension-docs
(doc) Update Extension package docs
2 parents 2f4c88b + 4f65a41 commit ed27e69

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/ODCZ7yumJJc" 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.
@@ -173,6 +182,21 @@ Get-ChildItem $env:ChocolateyInstall\extensions
173182
Get-ChildItem $env:ChocolateyInstall\extensions\example
174183
```
175184

185+
### Where Are Extensions Stored?
186+
187+
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+
176200
### Using Shared PowerShell Functions
177201

178202
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)