@gjsify/vite-plugin-gjsify 0.4.43 → 0.5.0

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.
Files changed (2) hide show
  1. package/README.md +48 -0
  2. package/package.json +9 -9
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @gjsify/vite-plugin-gjsify
2
+
3
+ Vite plugin presets that mirror `gjsify build --app browser` and `--app nativescript` under Vite's dev server and HMR. Ensures a dual-target gjsify app develops under Vite with the same transforms (gi:// aliasing, Blueprint compilation, platform resolution, Node polyfill aliases) as its production CLI build.
4
+
5
+ Part of the [gjsify](https://github.com/gjsify/gjsify) project — Node.js and Web APIs for GJS (GNOME JavaScript).
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ gjsify install @gjsify/vite-plugin-gjsify
11
+
12
+ # npm or yarn also work (e.g. adding it to an existing project):
13
+ npm install @gjsify/vite-plugin-gjsify
14
+ yarn add @gjsify/vite-plugin-gjsify
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ### Browser target
20
+
21
+ ```typescript
22
+ // vite.config.ts
23
+ import { defineConfig } from 'vite';
24
+ import { gjsifyBrowser } from '@gjsify/vite-plugin-gjsify';
25
+
26
+ export default defineConfig({
27
+ plugins: [...gjsifyBrowser({ reflection: false })],
28
+ });
29
+ ```
30
+
31
+ ### NativeScript target
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import nativescript from '@nativescript/vite';
37
+ import { gjsifyNativescript } from '@gjsify/vite-plugin-gjsify';
38
+
39
+ export default defineConfig({
40
+ plugins: [nativescript(), ...gjsifyNativescript()],
41
+ });
42
+ ```
43
+
44
+ Both presets resolve `@girs/*` / `gi://` imports to an empty module (those are GJS-only specifiers that leak transitively) and apply the gjsify alias layer for Node built-ins and polyfills.
45
+
46
+ ## License
47
+
48
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/vite-plugin-gjsify",
3
- "version": "0.4.43",
3
+ "version": "0.5.0",
4
4
  "description": "Vite plugin presets mirroring `gjsify build --app browser` / `--app nativescript` — dev (Vite/HMR) parity with the gjsify CLI targets.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -39,14 +39,14 @@
39
39
  ],
40
40
  "license": "MIT",
41
41
  "dependencies": {
42
- "@gjsify/empty": "^0.4.43",
43
- "@gjsify/resolve-npm": "^0.4.43",
44
- "@gjsify/rolldown-plugin-deepkit": "^0.4.43",
45
- "@gjsify/rolldown-plugin-gjsify": "^0.4.43",
46
- "@gjsify/vite-plugin-blueprint": "^0.4.43"
42
+ "@gjsify/empty": "^0.5.0",
43
+ "@gjsify/resolve-npm": "^0.5.0",
44
+ "@gjsify/rolldown-plugin-deepkit": "^0.5.0",
45
+ "@gjsify/rolldown-plugin-gjsify": "^0.5.0",
46
+ "@gjsify/vite-plugin-blueprint": "^0.5.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "vite": "^8.0.14"
49
+ "vite": "^8.0.16"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "vite": {
@@ -54,8 +54,8 @@
54
54
  }
55
55
  },
56
56
  "devDependencies": {
57
- "@types/node": "^25.9.1",
57
+ "@types/node": "^25.9.2",
58
58
  "typescript": "^6.0.3",
59
- "vite": "^8.0.14"
59
+ "vite": "^8.0.16"
60
60
  }
61
61
  }