@stowkit/three-loader 0.1.23 → 0.1.25
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/package.json +2 -2
- package/scripts/postinstall.js +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stowkit/three-loader",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
4
4
|
"description": "Three.js loader for StowKit asset packs",
|
|
5
5
|
"main": "dist/stowkit-three-loader.js",
|
|
6
6
|
"module": "dist/stowkit-three-loader.esm.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"keywords": [],
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"three": "
|
|
22
|
+
"three": ">=0.150.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@stowkit/reader": "^0.1.3"
|
package/scripts/postinstall.js
CHANGED
|
@@ -11,10 +11,19 @@ if (isInNodeModules) {
|
|
|
11
11
|
const src = path.join(__dirname, '..', 'public');
|
|
12
12
|
const dest = path.join(process.cwd(), 'public', 'stowkit');
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// Resolve to absolute paths for comparison
|
|
15
|
+
const srcAbs = path.resolve(src);
|
|
16
|
+
const destAbs = path.resolve(dest);
|
|
17
|
+
|
|
18
|
+
// Check if destination would be inside source (recursive copy)
|
|
19
|
+
const isRecursive = destAbs.startsWith(srcAbs + path.sep) || destAbs === srcAbs;
|
|
20
|
+
|
|
21
|
+
if (fs.existsSync(src) && !isRecursive) {
|
|
15
22
|
fs.mkdirSync(dest, { recursive: true });
|
|
16
23
|
fs.cpSync(src, dest, { recursive: true });
|
|
17
24
|
console.log('✓ Copied Basis and Draco decoders to public/stowkit/');
|
|
25
|
+
} else if (isRecursive) {
|
|
26
|
+
console.log('⊘ Skipping copy (would create recursive directory structure)');
|
|
18
27
|
}
|
|
19
28
|
|
|
20
29
|
// Copy WASM reader from @stowkit/reader package
|