@gjsify/vite-plugin-blueprint 0.4.27 → 0.4.29
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 +1 -1
- package/lib/index.js +5 -5
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { execa } from
|
|
2
|
-
import minifyXML from
|
|
1
|
+
import { execa } from 'execa';
|
|
2
|
+
import minifyXML from 'minify-xml';
|
|
3
3
|
export default function blueprintPlugin(options = {}) {
|
|
4
4
|
const { minify = false, verbose = false } = options;
|
|
5
5
|
return {
|
|
6
|
-
name:
|
|
6
|
+
name: 'vite-plugin-blueprint',
|
|
7
7
|
async load(id) {
|
|
8
|
-
if (id.endsWith(
|
|
8
|
+
if (id.endsWith('.blp')) {
|
|
9
9
|
try {
|
|
10
10
|
// Compile .blp file and get XML output directly
|
|
11
|
-
const { stdout } = await execa(
|
|
11
|
+
const { stdout } = await execa('blueprint-compiler', ['compile', id]);
|
|
12
12
|
if (verbose)
|
|
13
13
|
console.log(`Compiled ${id}`);
|
|
14
14
|
let xmlContent = stdout;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/vite-plugin-blueprint",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.29",
|
|
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",
|