Skip to content

Commit ec0c596

Browse files
committed
docs: adds explanation to what -ex does
1 parent e2854a2 commit ec0c596

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

16/umbraco-cms/customizing/development-flow/umbraco-extension-template.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,31 @@ dotnet new umbraco-extension -n MyExtension -ex
2828

2929
This command creates a new folder called `MyExtension` with the following files and folders:
3030
- `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.
3533
- `README.md`: A readme file with instructions on how to build and run the extension.
3634

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+
3744
### Include the Extension in your Umbraco Project
3845

3946
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**.
4047

48+
You can also add the reference manually by running the following command in the root folder of your Umbraco project:
49+
50+
```bash
51+
dotnet add reference ../MyExtension/MyExtension.csproj
52+
```
53+
54+
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+
4156
## Build and Run the Extension
4257

4358
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

Comments
 (0)