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: 16/umbraco-cms/customizing/development-flow/umbraco-extension-template.md
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,16 +28,31 @@ dotnet new umbraco-extension -n MyExtension -ex
28
28
29
29
This command creates a new folder called `MyExtension` with the following files and folders:
30
30
-`MyExtension.csproj`: The project file for the extension.
31
-
-`Client`: A folder containing the source code for the extension.
32
-
-`tsconfig.json`: The TypeScript configuration file.
33
-
-`vite.config.ts`: The Vite configuration file.
34
-
-`package.json`: The Node.js package configuration file.
31
+
-`Constants.cs`: A file containing constants for the extension.
32
+
-`Client`: A folder containing the source code for the extension, a package.json file, a tsconfig.json file, and the vite.config.ts configuration file.
35
33
-`README.md`: A readme file with instructions on how to build and run the extension.
36
34
35
+
The `-ex` flag indicates that you want to include examples of how to use the extension. This flag is optional, but it is recommended to include it if you are new to building extensions for Umbraco. It will additionally give you:
36
+
37
+
-`Composers`: A folder containing an example composer that registers a custom Swagger API.
38
+
-`Controllers`: A folder containing an example API controller for a dashboard.
39
+
-`Client/src/api`: A folder containing an example API client that calls the API controller.
40
+
-`Client/src/dashboards`: A folder containing an example dashboard Web Component that uses the API client.
41
+
42
+
You should be able to see the dashboard in the main Content section of the Backoffice.
43
+
37
44
### Include the Extension in your Umbraco Project
38
45
39
46
To include the extension in your Umbraco project, you need to add a reference to the extension project in your Umbraco project. You can do this by right-clicking on the **Dependencies** node in your Umbraco project and selecting **Add Reference**. Then select the `MyExtension` project and click **OK**.
40
47
48
+
You can also add the reference manually by running the following command in the root folder of your Umbraco project:
This command adds a reference to the `MyExtension` project in your Umbraco project. You can then build your Umbraco project and see the extension in action.
55
+
41
56
## Build and Run the Extension
42
57
43
58
To build and run the extension, you need to install the dependencies and start the Vite development server. You can do this by running the following commands in the `Client` folder of your extension project:
0 commit comments