@gjsify/vite-plugin-gjsify 0.59.1 → 0.61.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.
- package/lib/index.d.ts +7 -0
- package/lib/index.js +5 -3
- package/package.json +8 -8
package/lib/index.d.ts
CHANGED
|
@@ -68,6 +68,13 @@ export interface GjsifyNativescriptOptions {
|
|
|
68
68
|
* is always excluded.
|
|
69
69
|
*/
|
|
70
70
|
optimizeDepsExclude?: string[];
|
|
71
|
+
/**
|
|
72
|
+
* Answer `gi://Adw` / `gi://Gtk` / `gi://GObject` … with `@gjsify/adwaita-nativescript`'s
|
|
73
|
+
* namespaces instead of an empty module — the Vite mirror of `gjsify build --app nativescript
|
|
74
|
+
* --gi-renderer`. `@girs/<ns>-<ver>` then falls through to its package (whose body is the
|
|
75
|
+
* `gi://` line). Off by default: it makes the widget toolkit a build-time dependency.
|
|
76
|
+
*/
|
|
77
|
+
giRenderer?: boolean;
|
|
71
78
|
}
|
|
72
79
|
/**
|
|
73
80
|
* Returns the Vite plugin array that brings `gjsify build --app nativescript`'s
|
package/lib/index.js
CHANGED
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
import { createRequire } from 'node:module';
|
|
39
39
|
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
40
40
|
import * as nodePath from 'node:path';
|
|
41
|
-
import { gjsImportsEmptyPlugin, platformResolvePlugin, nativescriptSuffixChain, browserSuffixChain, BROWSER_REFUSED_SUFFIXES, detectNativescriptPlatform, nativescriptPlatformDefines, cssAsStringPlugin, } from '@gjsify/rolldown-plugin-gjsify';
|
|
41
|
+
import { gjsImportsEmptyPlugin, giRendererPlugin, platformResolvePlugin, nativescriptSuffixChain, browserSuffixChain, BROWSER_REFUSED_SUFFIXES, detectNativescriptPlatform, nativescriptPlatformDefines, cssAsStringPlugin, } from '@gjsify/rolldown-plugin-gjsify';
|
|
42
42
|
import blueprintPlugin from '@gjsify/vite-plugin-blueprint';
|
|
43
43
|
import { deepkitPlugin } from '@gjsify/rolldown-plugin-deepkit';
|
|
44
|
-
import { ALIASES_NODE_FOR_NATIVESCRIPT } from '@gjsify/resolve-npm';
|
|
44
|
+
import { ALIASES_NODE_FOR_NATIVESCRIPT, GI_RENDERERS } from '@gjsify/resolve-npm';
|
|
45
45
|
import { installedGjsifyPackages } from './nativescript-dedupe.js';
|
|
46
46
|
/**
|
|
47
47
|
* Returns the Vite plugin array that brings `gjsify build --app browser`'s
|
|
@@ -353,8 +353,10 @@ export function gjsifyNativescript(options = {}) {
|
|
|
353
353
|
};
|
|
354
354
|
},
|
|
355
355
|
};
|
|
356
|
+
const giRenderer = options.giRenderer ? GI_RENDERERS['nativescript'] : undefined;
|
|
356
357
|
return [
|
|
357
|
-
|
|
358
|
+
...(giRenderer ? [giRendererPlugin({ app: 'nativescript', ...giRenderer })] : []),
|
|
359
|
+
gjsImportsEmptyPlugin({ emptyGirs: !giRenderer }),
|
|
358
360
|
// Platform-specific source variants (`*.android` / `*.ios` /
|
|
359
361
|
// `*.native`). A `resolveId` HOOK, NOT a `resolve.alias` — so it works
|
|
360
362
|
// under Vite 8 / Rolldown, where @nativescript/vite's function-based
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/vite-plugin-gjsify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.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",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
],
|
|
44
44
|
"license": "MIT",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@gjsify/empty": "^0.
|
|
47
|
-
"@gjsify/resolve-npm": "^0.
|
|
48
|
-
"@gjsify/rolldown-plugin-deepkit": "^0.
|
|
49
|
-
"@gjsify/rolldown-plugin-gjsify": "^0.
|
|
50
|
-
"@gjsify/vite-plugin-blueprint": "^0.
|
|
46
|
+
"@gjsify/empty": "^0.61.0",
|
|
47
|
+
"@gjsify/resolve-npm": "^0.61.0",
|
|
48
|
+
"@gjsify/rolldown-plugin-deepkit": "^0.61.0",
|
|
49
|
+
"@gjsify/rolldown-plugin-gjsify": "^0.61.0",
|
|
50
|
+
"@gjsify/vite-plugin-blueprint": "^0.61.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"vite": "^8.1.3"
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@gjsify/cli": "^0.
|
|
62
|
-
"@gjsify/unit": "^0.
|
|
61
|
+
"@gjsify/cli": "^0.61.0",
|
|
62
|
+
"@gjsify/unit": "^0.61.0",
|
|
63
63
|
"@types/node": "^25.9.2",
|
|
64
64
|
"typescript": "^6.0.3",
|
|
65
65
|
"vite": "^8.1.3"
|