@gjsify/vite-plugin-blueprint 0.4.43 → 0.4.44

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 +42 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @gjsify/vite-plugin-blueprint
2
+
3
+ Vite/Rollup/Rolldown plugin that compiles GNOME Blueprint (`.blp`) UI files to GTK XML strings via `blueprint-compiler`. Import a `.blp` file and receive its compiled XML as a JavaScript string, ready for `Gtk.Builder`.
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-blueprint
11
+
12
+ # npm or yarn also work (e.g. adding it to an existing project):
13
+ npm install @gjsify/vite-plugin-blueprint
14
+ yarn add @gjsify/vite-plugin-blueprint
15
+ ```
16
+
17
+ Requires `blueprint-compiler` to be installed on the system (e.g. `sudo dnf install blueprint-compiler`).
18
+
19
+ ## Usage
20
+
21
+ ```typescript
22
+ // vite.config.ts
23
+ import { defineConfig } from 'vite';
24
+ import blueprintPlugin from '@gjsify/vite-plugin-blueprint';
25
+
26
+ export default defineConfig({
27
+ plugins: [blueprintPlugin({ minify: false })],
28
+ });
29
+ ```
30
+
31
+ ```typescript
32
+ // In your GJS app source
33
+ import windowXml from './window.blp';
34
+
35
+ const builder = Gtk.Builder.new_from_string(windowXml, -1);
36
+ ```
37
+
38
+ Add type declarations by including `"@gjsify/vite-plugin-blueprint/types"` in your `tsconfig.json` `compilerOptions.types`.
39
+
40
+ ## License
41
+
42
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/vite-plugin-blueprint",
3
- "version": "0.4.43",
3
+ "version": "0.4.44",
4
4
  "description": "Compile GNOME Blueprint .blp templates to XML strings via blueprint-compiler. Vite / Rollup / Rolldown compatible.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",