@eclipse-docks/create-app 0.7.86 → 0.7.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/template/README.md
CHANGED
|
@@ -18,9 +18,13 @@ Then open the URL shown in the terminal (e.g. https://localhost:5173/).
|
|
|
18
18
|
|
|
19
19
|
## Structure
|
|
20
20
|
|
|
21
|
-
- **packages/app** – The Docks app (entry point,
|
|
21
|
+
- **packages/app** – The Docks app (entry point, UI)
|
|
22
22
|
- **packages/example-extension** – Example extension; use it as a reference to add your own
|
|
23
23
|
|
|
24
|
+
## Extensions
|
|
25
|
+
|
|
26
|
+
Add `@eclipse-docks/extension-*` packages to `packages/app/package.json`, then list them in `packages/app/src/main.ts` (`registerApp({ extensions: [...] })`). Vite loads their side-effect entry points automatically via `resolveDepVersionsPlugin()` in `vite.config.ts` (no separate `extensions.ts` file). Pass `extensionSideEffects: false` if you need to disable that.
|
|
27
|
+
|
|
24
28
|
## PWA
|
|
25
29
|
|
|
26
|
-
The app is set up with **vite-plugin-pwa** (injectManifest), a **service worker** at `packages/app/src/sw.ts`, and **`@eclipse-docks/extension-pwa`** for install / update controls in the main center toolbar. Production `npm run build` emits the web app manifest and precached assets. To opt out, remove the PWA extension from `packages/app/
|
|
30
|
+
The app is set up with **vite-plugin-pwa** (injectManifest), a **service worker** at `packages/app/src/sw.ts`, and **`@eclipse-docks/extension-pwa`** for install / update controls in the main center toolbar. Production `npm run build` emits the web app manifest and precached assets. To opt out, remove the PWA extension from `packages/app/package.json` and `packages/app/src/main.ts`, delete `src/sw.ts`, and strip the `VitePWA(...)` block from `packages/app/vite.config.ts` (and set `resolveDepVersionsPlugin({ extensionSideEffects: false })` if you no longer want automatic extension imports).
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { appLoaderService, contributionRegistry, type HTMLContribution, TOOLBAR_MAIN } from '@eclipse-docks/core';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/** Which extensions the shell offers; keep in sync with `@eclipse-docks/extension-*` entries in package.json (those are auto side-effect-imported in vite.config.ts). */
|
|
5
4
|
contributionRegistry.registerContribution(TOOLBAR_MAIN, {
|
|
6
5
|
label: 'Brand',
|
|
7
6
|
slot: 'start',
|
|
@@ -22,6 +22,7 @@ export default defineConfig({
|
|
|
22
22
|
},
|
|
23
23
|
plugins: [
|
|
24
24
|
appSplashPlugin(),
|
|
25
|
+
/** Side-effect-imports every `@eclipse-docks/extension-*` direct dependency from package.json (virtual module before main). */
|
|
25
26
|
resolveDepVersionsPlugin(),
|
|
26
27
|
localAliasesPlugin({
|
|
27
28
|
useSrcInDev: true,
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Explicit imports of workspace extensions so they are included in the bundle.
|
|
3
|
-
* Replaces import.meta.glob('../../extension-xxx/src/index.ts') to avoid .ts paths
|
|
4
|
-
* in module URLs (servers often map .ts to video/mp2t MIME type).
|
|
5
|
-
* Add or remove imports when you add or remove extensions from the app config.
|
|
6
|
-
*
|
|
7
|
-
* PWA is imported first so `beforeinstallprompt` can be captured early (see extension-pwa).
|
|
8
|
-
*/
|
|
9
|
-
import '@eclipse-docks/extension-pwa';
|
|
10
|
-
import '@eclipse-docks/extension-ai-system';
|
|
11
|
-
import '@eclipse-docks/extension-command-palette';
|
|
12
|
-
import '@eclipse-docks/extension-catalog';
|
|
13
|
-
import '@eclipse-docks/extension-md-editor';
|
|
14
|
-
import '@eclipse-docks/extension-media-viewer';
|
|
15
|
-
import '@eclipse-docks/extension-memory-usage';
|
|
16
|
-
import '@eclipse-docks/extension-monaco-editor';
|
|
17
|
-
import '@eclipse-docks/extension-plain-editor';
|
|
18
|
-
import '@eclipse-docks/extension-settings-tree';
|
|
19
|
-
import '@eclipse-docks/extension-utils';
|
|
20
|
-
import 'example-extension';
|