@needle-tools/gltf-build-pipeline 2.1.0-alpha.2 → 2.1.0-alpha.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-build-pipeline",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.4",
|
|
4
4
|
"description": "Pipeline and tools for optimizing gltf files using gltf-transform and compression settings within glTF extensions",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
40
|
"@img/sharp-linux-arm": "^0.33.4",
|
|
41
|
-
"@img/sharp-win32-x64": "^0.33.4"
|
|
41
|
+
"@img/sharp-win32-x64": "^0.33.4",
|
|
42
|
+
"@img/sharp-darwin-arm64": "^0.33.4",
|
|
43
|
+
"@img/sharp-darwin-x64": "^0.33.4"
|
|
42
44
|
},
|
|
43
45
|
"dependencies": {
|
|
44
46
|
"@donmccurdy/caporal": "~0.0.10",
|
package/dist/src/cli/index.js
CHANGED
|
@@ -181,4 +181,12 @@ Each version will be compressed and written to the output directory.
|
|
|
181
181
|
writeFileStatsToFile(config, file_stats, statsFile);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
|
-
program.run()
|
|
184
|
+
program.run().catch(err => {
|
|
185
|
+
// Since we still invoke this package with paths when running npm scripts we need to ignore this error
|
|
186
|
+
// We might want to move this code here into an extra package.
|
|
187
|
+
if (err.message.includes("Unknown command") && !err.message.includes("Did you mean")) {
|
|
188
|
+
// ignore
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
throw err;
|
|
192
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-build-pipeline",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.4",
|
|
4
4
|
"description": "Pipeline and tools for optimizing gltf files using gltf-transform and compression settings within glTF extensions",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
40
|
"@img/sharp-linux-arm": "^0.33.4",
|
|
41
|
-
"@img/sharp-win32-x64": "^0.33.4"
|
|
41
|
+
"@img/sharp-win32-x64": "^0.33.4",
|
|
42
|
+
"@img/sharp-darwin-arm64": "^0.33.4",
|
|
43
|
+
"@img/sharp-darwin-x64": "^0.33.4"
|
|
42
44
|
},
|
|
43
45
|
"dependencies": {
|
|
44
46
|
"@donmccurdy/caporal": "~0.0.10",
|
package/scripts/pack-gltf.mjs
CHANGED
|
@@ -70,12 +70,15 @@ const stats = {
|
|
|
70
70
|
totalFileSizeInMBBefore: 0,
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
const config = getConfig();
|
|
74
|
+
|
|
73
75
|
|
|
74
76
|
/** Compress a glTF file
|
|
75
77
|
* @param {string} file
|
|
76
78
|
*/
|
|
77
79
|
async function packFile(file) {
|
|
78
80
|
return packGLTF(file, file, {
|
|
81
|
+
config,
|
|
79
82
|
debug,
|
|
80
83
|
packedFiles,
|
|
81
84
|
useCache: allowCaching,
|
|
@@ -86,7 +89,6 @@ async function packFile(file) {
|
|
|
86
89
|
|
|
87
90
|
const inputArgs = args.slice(2);
|
|
88
91
|
let failed = false;
|
|
89
|
-
const config = getConfig();
|
|
90
92
|
const logger = new Logger(Verbosity.INFO);
|
|
91
93
|
|
|
92
94
|
foreachGLTF(inputArgs, async (file) => {
|