Skip to content

Commit 8a2687f

Browse files
authored
Update get-started.md
1 parent 337cc91 commit 8a2687f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/get-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,19 @@ The generator creates a project with the following structure. Some files are boi
137137

138138
* **`package.json`**Project dependencies and scripts. Use `npm run build` to build once, or `npm run build:dev` to build and watch for changes. Only edit this if you need to add packages.
139139
* **`tsconfig.json`**TypeScript compiler settings.
140-
* **`build.helpers.mjs`**Shared esbuild utilities used by `build-extension.mjs`. Contains the compiler config (`commonConfig`), a plugin that copies the bundle to your app's `extensions/` folder (`copyToAppPlugin`), and a plugin that copies `src/manifest.json` to the output directory (`copyManifestPlugin`). You do not need to edit this file.
140+
* **`build.helpers.mjs`**Shared esbuild utilities used by `build-extension.mjs`. You do not need to edit this file.
141141

142142
#### Build and deployment
143143

144-
* **`build-extension.mjs`**The build entry point that wires everything together using esbuild. It defines the output directory (`outDir`), the source entry points (`src/main/index.ts``main`, `src/ui/index.tsx``tab`), and supports a `--watch` flag for live rebuilding. Set `appDir` to the absolute path of your Mendix app folder so the built extension is copied there automatically after each build. All the paths can be given while setting the template through the questions on your terminal.
144+
* **`build-extension.mjs`**The build entry point that wires everything together using esbuild. It defines the output directory (`outDir`), the source entry points (`src/main/index.ts``main`, `src/ui/index.tsx``tab`), and supports a `--watch` flag for live rebuilding. Set `appDir` to the absolute path of your Mendix app folder so the built extension is copied there automatically after each build. All the paths can be given while setting the template through the questions on your terminal. If you update the name of an entrypoint or add a new one you should also update it in this file.
145145

146146
{{% alert color="info" %}}
147147
The `dist/` folder is generated by `npm run build` and is not present until you build for the first time. Never edit files inside `dist/` directly, as your changes will be overwritten on the next build.
148148
{{% /alert %}}
149149

150150
#### Source files
151151

152-
* **`src/manifest.json`**Tells Studio Pro how to load your extension: which compiled JS files are the entry points (`main.js`, `tab.js`) and what permissions the extension requires. Update this file if you rename your entry point files.
152+
* **`src/manifest.json`**Tells Studio Pro how to load your extension: which compiled JS files are the entry points (`main.js`, `tab.js`) and what permissions the extension requires. Update this file if you rename your entry point files. If you add an entry point or update its name here, you should also update it in the `build-extension.mjs`.
153153
* **`src/main/index.ts`**The extension's main logic, which runs inside Studio Pro. Gets 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`.
154154
* **`src/ui/index.tsx`**The React component rendered inside the Studio Pro tab. In the template it renders a simple heading and paragraph adn you should replace it with your own UI. If you rename this file, update two places: the entry point in `build-extension.mjs`, and the `uiEntrypoint` value passed to `studioPro.ui.tabs.open(...)` in `src/main/index.ts`. You can delete this file entirely if you also remove both of those references.
155155

0 commit comments

Comments
 (0)