Skip to content

Commit 578d5e9

Browse files
authored
Merge pull request #6817 from umbraco/property-editor-update
Updated import module
2 parents 3315fd8 + 4290ff7 commit 578d5e9

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

15/umbraco-cms/customizing/development-flow/vite-package-setup.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ Before following this guide, read the [Setup Your Development Environment](./) a
2727
npm create vite@latest
2828
```
2929

30-
This command will help you set up your new package, asking you to pick a framework and a compiler.
30+
This command will set up your new package and ask you to pick a framework and a compiler.
3131

32-
3. Enter `Client` as both the **Project Name** and **Package name** when prompted,
32+
3. Enter `Client` as both the **Project Name** and **Package name** when prompted.
33+
34+
4. Choose **Lit** and **TypeScript** as the framework and language.
3335

3436
{% hint style="info" %}
35-
For following this tutorial, we recommend using the names given above, although you can choose any other you prefer.
37+
For this tutorial, it is recommended to use the names given above. However, feel free to choose other names if preferred.
3638
{% endhint %}
3739

38-
4. Choose **Lit** and **TypeScript**.
39-
4040
<figure><img src="../../extending/customize-backoffice/development-flow/images/vite-project-cli.jpg" alt=""><figcaption><p>Create vite command choices</p></figcaption></figure>
4141

4242
This creates a new folder called `Client`, sets up our new project, and creates a `package.json` file, which includes the necessary packages. This is where all your source files live.
4343

4444
{% hint style="info" %}
45-
Alternatively of the two steps above, you can type the following:
45+
Alternatively, you can skip the interactive prompts and use this command:
4646

4747
```typescript
4848
npm create vite@latest Client -- --template lit-ts
@@ -51,25 +51,30 @@ npm create vite@latest Client -- --template lit-ts
5151
This will create a Vite Package with Lit and TypeScript in a folder called **Client**.
5252
{% endhint %}
5353

54-
5. Navigate to the new project folder **Client** and install the packages using:
54+
5. Navigate to the **Client** project folder and install the required packages:
5555

5656
```bash
5757
npm install
5858
```
5959

60+
Before proceeding, ensure that you install the version of the Backoffice package compatible with your Umbraco installation. You can find the appropriate version on the [@umbraco-cms/backoffice npm page](https://www.npmjs.com/package/@umbraco-cms/backoffice).
61+
6062
6. Install the Backoffice package using the following command:
6163

6264
```bash
6365
npm install -D @umbraco-cms/backoffice
6466
```
6567

6668
{% hint style="info" %}
67-
Optionally you can use `--legacy-peer-deps` in the installation command to avoid installing Umbraco´s sub-dependencies like TinyMCE and Monaco Editor:\
68-
`npm install --legacy-peer-deps -D @umbraco-cms/backoffice`
69-
70-
If this is used the Intellisense to those external references will not be available.
69+
To avoid installing Umbraco’s sub-dependencies such as TinyMCE and Monaco Editor, you can add the `--legacy-peer-deps` flag:
7170
{% endhint %}
7271

72+
```bash
73+
` npm install --legacy-peer-deps -D @umbraco-cms/backoffice`
74+
```
75+
76+
Using this flag will disable Intellisense for external references.
77+
7378
7. Open the `tsconfig.json` file.
7479
8. Add the array `types` inside `compilerOptions`, with the entry of `@umbraco-cms/backoffice/extension-types`:
7580

@@ -109,7 +114,7 @@ export default defineConfig({
109114
{% endcode %}
110115

111116
{% hint style="info" %}
112-
The `outDir` parameter specifies where the compiled files will be placed. In this case, it is the `App_Plugins/Client` folder. If you have a different structure such as a Razor Class Library (RCL) project, you should change this path to `wwwroot`.
117+
The `outDir` parameter specifies where the compiled files are placed. In this example, they are stored in the `App_Plugins/Client` folder. If you are working with a different structure, such as a Razor Class Library (RCL) project, update this path to `wwwroot`.
113118
{% endhint %}
114119

115120
This alters the Vite default output into a **library mode**, where the output is a JavaScript file with the same name as the `name` attribute in `package.json`. The name is `client.js` if you followed this tutorial with no changes.

15/umbraco-cms/tutorials/creating-a-property-editor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Now let's create the web component we need for our property editor.
8686
{% code title="suggestions-property-editor-ui.element.ts" %}
8787
```typescript
8888
import { LitElement, html, customElement, property } from "@umbraco-cms/backoffice/external/lit";
89-
import { UmbPropertyEditorUiElement } from "@umbraco-cms/backoffice/extension-registry";
89+
import { UmbPropertyEditorUiElement } from "@umbraco-cms/backoffice/property-editor";
9090

9191
@customElement('my-suggestions-property-editor-ui')
9292
export default class MySuggestionsPropertyEditorUIElement extends LitElement implements UmbPropertyEditorUiElement {

0 commit comments

Comments
 (0)