@needle-tools/gltf-build-pipeline 1.6.0-alpha.6 → 2.0.0-alpha

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 CHANGED
@@ -1,30 +1,51 @@
1
1
  {
2
2
  "name": "@needle-tools/gltf-build-pipeline",
3
- "version": "1.6.0-alpha.6",
3
+ "version": "2.0.0-alpha",
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",
7
7
  "readme": "README.md",
8
+ "author": {
9
+ "name": "Needle",
10
+ "email": "help@needle.tools",
11
+ "url": "https://needle.tools/"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/needle-tools/needle-gltf-extensions.git"
16
+ },
8
17
  "bin": {
9
- "gltf-build-pipeline": "./dist/src/cli/index.js"
18
+ "gltf-build-pipeline": "./dist/src/cli/index.js",
19
+ "needle-gltf": "./dist/src/cli/index.js"
10
20
  },
11
21
  "scripts": {
12
22
  "start": "node scripts/index.mjs",
13
23
  "dev": "npm-watch compile",
24
+ "compile": "tsc || exit 1",
25
+ "clear-caches": "node scripts/clear-caches.mjs",
26
+ "limit-caches": "node scripts/limit-caches.mjs",
14
27
  "transform": "node scripts/index.mjs",
15
28
  "transform:make-progressive": "node scripts/make-progressive.mjs",
16
29
  "transform:pack-gltf": "node --no-experimental-fetch scripts/pack-gltf.mjs",
17
30
  "pack-gltf": "node --no-experimental-fetch scripts/pack-gltf.mjs",
18
- "dev:pack-gltf": "npm run compile && node scripts/pack-gltf.mjs",
19
- "clear-caches": "node scripts/clear-caches.mjs",
20
- "limit-caches": "node scripts/limit-caches.mjs",
21
- "compile": "tsc || exit 1"
31
+ "dev:pack-gltf": "npm run compile && node scripts/pack-gltf.mjs"
32
+ },
33
+ "devDependencies": {
34
+ "@img/sharp-win32-x64": "^0.33.4",
35
+ "@types/node": "^18.7.23",
36
+ "npm-watch": "^0.13.0",
37
+ "typescript": "^4.9.5"
38
+ },
39
+ "optionalDependencies": {
40
+ "@img/sharp-linux-arm": "^0.33.4",
41
+ "@img/sharp-win32-x64": "^0.33.4"
22
42
  },
23
43
  "dependencies": {
24
44
  "@donmccurdy/caporal": "~0.0.10",
25
- "@gltf-transform/core": "^3.10.1",
26
- "@gltf-transform/extensions": "^3.10.1",
27
- "@gltf-transform/functions": "^3.10.1",
45
+ "@gltf-transform/cli": "^4.0.1",
46
+ "@gltf-transform/core": "^4.0.1",
47
+ "@gltf-transform/extensions": "^4.0.1",
48
+ "@gltf-transform/functions": "^4.0.1",
28
49
  "command-exists": "^1.2.9",
29
50
  "command-line-args": "^5.2.1",
30
51
  "draco3dgltf": "^1.5.3",
@@ -36,7 +57,7 @@
36
57
  "ndarray-pixels": "^2.0.1",
37
58
  "p-limit": "3.1.0",
38
59
  "semver": "^7.3.7",
39
- "sharp": "^0.32.6",
60
+ "sharp": "^0.33.4",
40
61
  "tmp": "^0.2.1",
41
62
  "uuid": "^9.0.1"
42
63
  },
@@ -48,20 +69,5 @@
48
69
  "extensions": "ts",
49
70
  "quiet": false
50
71
  }
51
- },
52
- "devDependencies": {
53
- "@types/node": "^18.7.23",
54
- "nodemon": "^3.1.2",
55
- "npm-watch": "^0.13.0",
56
- "typescript": "^4.9.5"
57
- },
58
- "author": {
59
- "name": "Needle",
60
- "email": "help@needle.tools",
61
- "url": "https://needle.tools/"
62
- },
63
- "repository": {
64
- "type": "git",
65
- "url": "git+https://github.com/needle-tools/needle-gltf-extensions.git"
66
72
  }
67
- }
73
+ }
@@ -1,4 +1,4 @@
1
1
 
2
- import { clearCache } from '../dist/cache/index.js';
2
+ import { clearCache } from '../dist/src/cache/index.js';
3
3
 
4
4
  clearCache();
@@ -1,6 +1,6 @@
1
1
  import { ALL_EXTENSIONS } from '@gltf-transform/extensions';
2
- import { ALL_EXTENSIONS as NEEDLE_EXTENSIONS } from "../dist/extensions/NEEDLE_opaque/index.js";
3
- import { NEEDLE_progressive } from '../dist/index.js';
2
+ import { ALL_EXTENSIONS as NEEDLE_EXTENSIONS } from "../dist/src/extensions/NEEDLE_opaque/index.js";
3
+ import { NEEDLE_progressive } from '../dist/src/index.js';
4
4
 
5
5
 
6
6
  export function registerExtensions(node) {
@@ -1,4 +1,4 @@
1
- import { foreachGLTF as foreach } from '../dist/index.js';
1
+ import { foreachGLTF as foreach } from '../dist/src/index.js';
2
2
 
3
3
 
4
4
  export function foreachGLTF(args, callback) {
package/scripts/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { spawnSync } from "child_process";
3
- import { getVersion } from "../dist/index.js";
3
+ import { getVersion } from "../dist/src/index.js";
4
4
 
5
5
  const workingDir = process.cwd();
6
6
 
@@ -1,4 +1,4 @@
1
1
 
2
- import { limitCacheSize } from '../dist/cache/index.js';
2
+ import { limitCacheSize } from '../dist/src/cache/index.js';
3
3
 
4
4
  limitCacheSize(512);
@@ -1,5 +1,5 @@
1
- import { getConfig, getVersion } from '../dist/index.js';
2
- import { make_progressive } from '../dist/transforms/needle_progressive.js';
1
+ import { getConfig, getVersion } from '../dist/src/index.js';
2
+ import { make_progressive } from '../dist/src/transforms/needle_progressive.js';
3
3
 
4
4
  const args = process.argv;
5
5
 
@@ -1,6 +1,6 @@
1
1
  import commandLineArgs from "command-line-args";
2
2
  import { foreachGLTF } from './fileutils.mjs';
3
- import { getVersion, limitCacheSize, getConfig, packGLTF, printStats } from '../dist/index.js';
3
+ import { getVersion, limitCacheSize, getConfig, packGLTF, printStats } from '../dist/src/index.js';
4
4
 
5
5
  console.log(`[Needle Build Pipeline] pack glTF — version ${getVersion()}`)
6
6
 
package/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "outDir": "dist",
5
5
  "declaration": true,
6
6
  "moduleResolution": "NodeNext",
7
- "module": "ESNext",
7
+ "module": "NodeNext",
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "resolveJsonModule": true