vite-plugin-prism-design 0.1.0 → 0.1.2
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/dist/index.js +3 -8
- package/package.json +10 -8
package/dist/index.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
-
});
|
|
7
|
-
|
|
8
1
|
// src/index.ts
|
|
9
2
|
import { spawn } from "child_process";
|
|
3
|
+
import { createRequire } from "module";
|
|
10
4
|
import path from "path";
|
|
11
5
|
import fs from "fs";
|
|
6
|
+
var require2 = createRequire(import.meta.url);
|
|
12
7
|
function findWidgetScript() {
|
|
13
8
|
try {
|
|
14
|
-
const widgetPkg =
|
|
9
|
+
const widgetPkg = require2.resolve("prism-design-widget/package.json");
|
|
15
10
|
const widgetDir = path.dirname(widgetPkg);
|
|
16
11
|
const iifeFile = path.join(widgetDir, "dist", "prism-design-widget.iife.js");
|
|
17
12
|
if (fs.existsSync(iifeFile)) return iifeFile;
|
package/package.json
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-prism-design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"dev": "tsup --watch"
|
|
12
|
-
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
13
11
|
"dependencies": {
|
|
14
|
-
"prism-design-widget": "
|
|
12
|
+
"prism-design-widget": "0.1.2"
|
|
15
13
|
},
|
|
16
14
|
"peerDependencies": {
|
|
17
15
|
"vite": ">=5.0.0"
|
|
@@ -20,5 +18,9 @@
|
|
|
20
18
|
"tsup": "^8.3.0",
|
|
21
19
|
"typescript": "^5.6.0",
|
|
22
20
|
"vite": "^6.0.0"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup",
|
|
24
|
+
"dev": "tsup --watch"
|
|
23
25
|
}
|
|
24
|
-
}
|
|
26
|
+
}
|