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: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/get-started.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,10 @@ To accelerate your extension development, Mendix provides an extension generator
43
43
44
44
To use the generator, navigate to your desired source code directory and run the command `npm create @mendix/extension@latest`. You may be prompted by `npm` to grant permission to install the generator. After installation, you will be guided through a series of questions to help configure your extension.
45
45
46
+
{{% alert color="info" %}}
47
+
Using `@latest` ensures you get the most recent version of the generator. Each generator release targets a specific Studio Pro version and its available APIs, so always use the latest template to make sure you have access to the full set of APIs for your target version. Some how-to guides in this documentation may not work correctly with older generator versions.
48
+
{{% /alert %}}
49
+
46
50
The generator asks the following questions:
47
51
48
52
* Select the programming language (TypeScript is used in the tutorials)
@@ -125,6 +129,34 @@ In the source code, you should see the following:
***`package.json`** – Definesprojectdependenciesandscripts. Use`npm run build`tobuildonce, or`npm run build:dev`tobuildandwatchforchanges. Editthisfileonlywhenyouneedtoaddpackages.
The`dist/`folderisgeneratedby`npm run build`anddoesnotexistuntilyoubuildforthefirsttime. Nevereditfilesinside`dist/`directly, asyourchangeswillbeoverwrittenonthenextbuild.
***`src/main/index.ts`** – Containstheextension's main logic, which runs inside Studio Pro. It retrieves the Studio Pro API via `getStudioProApi`, registers a menu item under **Extensions** in the top menu bar, and opens a tab that renders the UI component when clicked. This is the primary file you will edit. If you rename this file, update the corresponding entry point in `build-extension.mjs`.
0 commit comments