Skip to content

Commit 6c08add

Browse files
committed
(maint) Fix Extension guide
- Missing <files> directive in nuspec - Missing Export-ModuleMember in .psm1
1 parent 131ae1c commit 6c08add

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You might choose to use this over installing a full PowerShell module if you did
4747

4848
### Extension Package
4949

50-
An extension package is organised much like any other Chocolatey package - though instead of the scripts within the `tools` directory you may be familiar with, there should be an `extensions` directory.
50+
An extension package is organized much like any other Chocolatey package - though instead of the scripts within the `tools` directory you may be familiar with, there should be an `extensions` directory.
5151

5252
We'll now run through how to create an extension package, assuming you have an environment set up as in <Xref title="Preparing Your Environment for Package Creation" value="howto-prepare-env" />.
5353

@@ -79,6 +79,9 @@ Follow the steps below to get started:
7979
<summary>Extension package for testing.</summary>
8080
<tags>extension chocolatey package</tags>
8181
</metadata>
82+
<files>
83+
<file src="extensions\**" target="extensions" />
84+
</files>
8285
</package>
8386
```
8487

@@ -124,6 +127,8 @@ function Set-ConfigValue {
124127
$Configuration | ConvertTo-Json | Set-Content -Path $Path
125128
}
126129
}
130+
131+
Export-ModuleMember -Function Set-ConfigValue
127132
```
128133

129134
So, if you browse through the files in VS Code or Explorer, you should see a file structure like this:

0 commit comments

Comments
 (0)