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: 15/umbraco-cms/extending/packages/creating-a-package.md
+50-9Lines changed: 50 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,12 @@ To begin creating a package, start by setting up a package schema in the Umbraco
16
16
17
17

18
18
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.
24
25
25
26

26
27
@@ -104,11 +105,41 @@ Unlike previous versions, the `umbraco-extension` template does not generate a `
104
105
105
106
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.
106
107
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
+
107
136
### Transfer Files
108
137
109
138
Since the `umbraco-extension` template does not generate an `App_Plugins` folder by default, you will need to manually create it.
110
139
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.
112
143
113
144

114
145
@@ -147,13 +178,23 @@ The properties that can be specified include:
147
178
148
179
### Pack the Package
149
180
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
+
```
151
190
152
191

153
192
154
-
Alternatively, to specify the output location, use the following command:
193
+
#### Custom Output Location
155
194
156
-
```cs
195
+
To specify a different output location, use the following command:
0 commit comments