Skip to content

Commit b216aab

Browse files
committed
Incorporated comments
1 parent 2efcde1 commit b216aab

File tree

1 file changed

+50
-9
lines changed

1 file changed

+50
-9
lines changed

15/umbraco-cms/extending/packages/creating-a-package.md

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ To begin creating a package, start by setting up a package schema in the Umbraco
1616

1717
![Creating a package schema in the Backoffice](images/create-package.png)
1818

19-
4. On the `Create package` page, there are different fields that allow you to define the contents of the package based on backoffice items.
20-
5. Enter the Package Name at the top. For this tutorial, name the package `Custom Welcome Dashboard` matching the name used in the [Creating a Custom Dashboard Tutorial](../../tutorials/creating-a-custom-dashboard/).
21-
6. Fill in the required fields. For mroe information, see the [Package Content Section](#package-content-section).
22-
7. Click **Create** to generate the package schema.
23-
8. Click **Download** to download the package and inspect its contents.
19+
On the `Create package` page, there are different fields that allow you to define the contents of the package based on backoffice items.
20+
21+
1. Enter the Package Name at the top. For this tutorial, name the package `Custom Welcome Dashboard` matching the name used in the [Creating a Custom Dashboard Tutorial](../../tutorials/creating-a-custom-dashboard/).
22+
2. Fill in the required fields. For more information, see the [Package Content Section](#package-content-section).
23+
3. Click `Create` to generate the package schema.
24+
4. Click `Download` to download the package and inspect its contents.
2425

2526
![Download the package schema](images/generate-package=schema.png)
2627

@@ -104,11 +105,41 @@ Unlike previous versions, the `umbraco-extension` template does not generate a `
104105

105106
Additionally, the `.csproj` file is configured to support NuGet packaging, allowing you to distribute your extension. If you plan to include custom C# logic, the files you place in the root folder will be compiled into the package DLL.
106107

108+
#### Post-Installation Build Script
109+
110+
After creating the package project, you may be prompted to run a post-installation script:
111+
112+
```plaintext
113+
Template is configured to run the following action:
114+
Actual command: powershell cd Client;npm install;npm run build;
115+
Do you want to run this action [Y(yes)|N(no)]?
116+
```
117+
118+
Selecting Y attempts to install dependencies and build the front-end assets. However, if you encounter an error like:
119+
120+
```plaintext
121+
File C:\Program Files\nodejs\npm.ps1 cannot be loaded. The file C:\Program Files\nodejs\npm.ps1 is not digitally signed.
122+
```
123+
124+
This occurs due to PowerShell’s execution policy restrictions.
125+
126+
#### Manual Installation (Workaround)
127+
128+
If the script fails, navigate to the `Client` folder and manually run the following commands:
129+
130+
```sh
131+
cd Client
132+
npm install
133+
npm run build
134+
```
135+
107136
### Transfer Files
108137

109138
Since the `umbraco-extension` template does not generate an `App_Plugins` folder by default, you will need to manually create it.
110139

111-
Create an **App_Plugins** folder and transfer its contents with the custom files created in the [Creating a Custom Dashboard Tutorial](../../tutorials/creating-a-custom-dashboard/).
140+
1. Create an `App_Plugins` folder in the downloaded package folder.
141+
2. Go to the `welcome-dashboard` folder created in the [Creating a Custom Dashboard Tutorial](../../tutorials/creating-a-custom-dashboard/README.md#setting-up-a-package).
142+
3. Transfer or copy the `welcome-dashboard` folder in the `App_Plugins` folder.
112143

113144
![App_Plugins with dashboard files](images/app-plugins-content.png)
114145

@@ -147,13 +178,23 @@ The properties that can be specified include:
147178

148179
### Pack the Package
149180

150-
To create the actual NuGet package, run the `dotnet pack` command in the package directory. The package will be output to the `bin` folder.
181+
To create the actual NuGet package, use the `dotnet pack` command. You can either output the package to the default `bin` folder or specify a custom location.
182+
183+
#### Default Output
184+
185+
Run the command in the package directory to generate the package in the `bin` folder:
186+
187+
```sh
188+
dotnet pack
189+
```
151190

152191
![Package output in `bin` folder](images/package-cli-command.png)
153192

154-
Alternatively, to specify the output location, use the following command:
193+
#### Custom Output Location
155194

156-
```cs
195+
To specify a different output location, use the following command:
196+
197+
```sh
157198
dotnet pack --output MyNugetPackages
158199
```
159200

0 commit comments

Comments
 (0)