@stowkit/three-loader 0.1.8 → 0.1.10
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 +3 -2
- package/scripts/postinstall.js +18 -0
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stowkit/three-loader",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
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",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"public"
|
|
10
|
+
"public",
|
|
11
|
+
"scripts"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
14
|
"build": "rollup -c",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// Only run if we're installed in node_modules (not during development)
|
|
5
|
+
const isInNodeModules = __dirname.includes('node_modules');
|
|
6
|
+
|
|
7
|
+
if (isInNodeModules) {
|
|
8
|
+
const src = path.join(__dirname, '..', 'public');
|
|
9
|
+
const dest = path.join(process.cwd(), 'public', 'stowkit');
|
|
10
|
+
|
|
11
|
+
if (fs.existsSync(src)) {
|
|
12
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
13
|
+
fs.cpSync(src, dest, { recursive: true });
|
|
14
|
+
console.log('✓ Copied StowKit Draco decoder to public/stowkit/');
|
|
15
|
+
}
|
|
16
|
+
} else {
|
|
17
|
+
console.log('Skipping postinstall (development mode)');
|
|
18
|
+
}
|