Prechádzať zdrojové kódy

[ts] Fix minification of player and threejs backends.

Mario Zechner 4 rokov pred
rodič
commit
ef6f2efb1a

+ 1 - 1
spine-ts/build.sh

@@ -17,7 +17,7 @@ if ! [ -z "$TS_UPDATE_URL" ] && ! [ -z "$BRANCH" ];
 then
 then
 	echo "Deploying spine-ts $BRANCH artifacts"
 	echo "Deploying spine-ts $BRANCH artifacts"
 	zip -j spine-ts.zip build/* spine-player/css/spine-player.css spine-player/example/external/*
 	zip -j spine-ts.zip build/* spine-player/css/spine-player.css spine-player/example/external/*
-	curl -F "[email protected]" "$TS_UPDATE_URL$BRANCH"
+	curl -f -F "[email protected]" "$TS_UPDATE_URL$BRANCH"
 else
 else
 	echo "Not deploying artifacts. TS_UPDATE_URL and/or BRANCH not set."
 	echo "Not deploying artifacts. TS_UPDATE_URL and/or BRANCH not set."
 fi
 fi

+ 62 - 0
spine-ts/package-lock.json

@@ -69,6 +69,14 @@
       "resolved": "spine-core",
       "resolved": "spine-core",
       "link": true
       "link": true
     },
     },
+    "node_modules/@esotericsoftware/spine-player": {
+      "resolved": "spine-player",
+      "link": true
+    },
+    "node_modules/@esotericsoftware/spine-threejs": {
+      "resolved": "spine-threejs",
+      "link": true
+    },
     "node_modules/@esotericsoftware/spine-webgl": {
     "node_modules/@esotericsoftware/spine-webgl": {
       "resolved": "spine-webgl",
       "resolved": "spine-webgl",
       "link": true
       "link": true
@@ -114,6 +122,11 @@
       "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
       "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
       "dev": true
       "dev": true
     },
     },
+    "node_modules/@types/three": {
+      "version": "0.131.0",
+      "resolved": "https://registry.npmjs.org/@types/three/-/three-0.131.0.tgz",
+      "integrity": "sha512-4VCtsDi6mIId96GcGKG91e2Y6VwU2T0u/YB7vCFJh1kXik93arxn7l9tVZHo1LXOtgCJJDdC+e1fwf2Vu/4ySw=="
+    },
     "node_modules/ansi-styles": {
     "node_modules/ansi-styles": {
       "version": "3.2.1",
       "version": "3.2.1",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
@@ -5383,6 +5396,11 @@
         "node": ">=4"
         "node": ">=4"
       }
       }
     },
     },
+    "node_modules/three": {
+      "version": "0.132.0",
+      "resolved": "https://registry.npmjs.org/three/-/three-0.132.0.tgz",
+      "integrity": "sha512-kv4WeP3O5/8mcHyuGYnqBQYdEfzSz9kEkq4H/9J966epNlGSVJ8gYC3SwT9qIITdgC0OvLr3zPltCS4dUyg2eg=="
+    },
     "node_modules/tslib": {
     "node_modules/tslib": {
       "version": "2.3.1",
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
@@ -5419,6 +5437,26 @@
       "version": "4.0.1",
       "version": "4.0.1",
       "license": "LicenseRef-LICENSE"
       "license": "LicenseRef-LICENSE"
     },
     },
+    "spine-player": {
+      "name": "@esotericsoftware/spine-player",
+      "version": "4.0.1",
+      "license": "LicenseRef-LICENSE"
+    },
+    "spine-threejs": {
+      "name": "@esotericsoftware/spine-threejs",
+      "version": "4.0.1",
+      "license": "LicenseRef-LICENSE",
+      "dependencies": {
+        "@types/three": "^0.131.0",
+        "three": "^0.132.0"
+      },
+      "devDependencies": {
+        "npx": "^10.2.2",
+        "rollup": "^2.56.2",
+        "rollup-plugin-dts": "^3.0.2",
+        "typescript": "^4.3.5"
+      }
+    },
     "spine-webgl": {
     "spine-webgl": {
       "name": "@esotericsoftware/spine-webgl",
       "name": "@esotericsoftware/spine-webgl",
       "version": "4.0.1",
       "version": "4.0.1",
@@ -5467,6 +5505,20 @@
     "@esotericsoftware/spine-core": {
     "@esotericsoftware/spine-core": {
       "version": "file:spine-core"
       "version": "file:spine-core"
     },
     },
+    "@esotericsoftware/spine-player": {
+      "version": "file:spine-player"
+    },
+    "@esotericsoftware/spine-threejs": {
+      "version": "file:spine-threejs",
+      "requires": {
+        "@types/three": "^0.131.0",
+        "npx": "^10.2.2",
+        "rollup": "^2.56.2",
+        "rollup-plugin-dts": "^3.0.2",
+        "three": "^0.132.0",
+        "typescript": "^4.3.5"
+      }
+    },
     "@esotericsoftware/spine-webgl": {
     "@esotericsoftware/spine-webgl": {
       "version": "file:spine-webgl"
       "version": "file:spine-webgl"
     },
     },
@@ -5497,6 +5549,11 @@
       "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
       "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
       "dev": true
       "dev": true
     },
     },
+    "@types/three": {
+      "version": "0.131.0",
+      "resolved": "https://registry.npmjs.org/@types/three/-/three-0.131.0.tgz",
+      "integrity": "sha512-4VCtsDi6mIId96GcGKG91e2Y6VwU2T0u/YB7vCFJh1kXik93arxn7l9tVZHo1LXOtgCJJDdC+e1fwf2Vu/4ySw=="
+    },
     "ansi-styles": {
     "ansi-styles": {
       "version": "3.2.1",
       "version": "3.2.1",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
@@ -9604,6 +9661,11 @@
         "has-flag": "^3.0.0"
         "has-flag": "^3.0.0"
       }
       }
     },
     },
+    "three": {
+      "version": "0.132.0",
+      "resolved": "https://registry.npmjs.org/three/-/three-0.132.0.tgz",
+      "integrity": "sha512-kv4WeP3O5/8mcHyuGYnqBQYdEfzSz9kEkq4H/9J966epNlGSVJ8gYC3SwT9qIITdgC0OvLr3zPltCS4dUyg2eg=="
+    },
     "tslib": {
     "tslib": {
       "version": "2.3.1",
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",

+ 2 - 2
spine-ts/package.json

@@ -7,8 +7,8 @@
     "build:core": "npx esbuild --bundle spine-core/src/index.ts --tsconfig=spine-core/tsconfig.json --minify --sourcemap --outfile=build/spine-core.js --format=iife --global-name=\"spine\"",
     "build:core": "npx esbuild --bundle spine-core/src/index.ts --tsconfig=spine-core/tsconfig.json --minify --sourcemap --outfile=build/spine-core.js --format=iife --global-name=\"spine\"",
     "build:canvas": "npx esbuild --bundle spine-canvas/src/index.ts --tsconfig=spine-canvas/tsconfig.json --minify --sourcemap --outfile=build/spine-canvas.js --format=iife --global-name=\"spine\"",
     "build:canvas": "npx esbuild --bundle spine-canvas/src/index.ts --tsconfig=spine-canvas/tsconfig.json --minify --sourcemap --outfile=build/spine-canvas.js --format=iife --global-name=\"spine\"",
     "build:webgl": "npx esbuild --bundle spine-webgl/src/index.ts --tsconfig=spine-webgl/tsconfig.json --minify --sourcemap --outfile=build/spine-webgl.js --format=iife --global-name=\"spine\"",
     "build:webgl": "npx esbuild --bundle spine-webgl/src/index.ts --tsconfig=spine-webgl/tsconfig.json --minify --sourcemap --outfile=build/spine-webgl.js --format=iife --global-name=\"spine\"",
-    "build:player": "npx esbuild --bundle spine-player/src/index.ts --tsconfig=spine-player/tsconfig.json --sourcemap --outfile=build/spine-player.js --format=iife --global-name=\"spine\"",
-    "build:threejs": "npx esbuild --bundle spine-threejs/src/index.ts --tsconfig=spine-threejs/tsconfig.json --sourcemap --outfile=build/spine-threejs.js --external:three --format=iife --global-name=\"spine\""
+    "build:player": "npx esbuild --bundle spine-player/src/index.ts --tsconfig=spine-player/tsconfig.json --minify --sourcemap --outfile=build/spine-player.js --format=iife --global-name=\"spine\"",
+    "build:threejs": "npx esbuild --bundle spine-threejs/src/index.ts --tsconfig=spine-threejs/tsconfig.json --minify --sourcemap --outfile=build/spine-threejs.js --external:three --format=iife --global-name=\"spine\""
   },
   },
   "repository": {
   "repository": {
     "type": "git",
     "type": "git",

+ 2 - 2
spine-ts/spine-threejs/package.json

@@ -1,5 +1,5 @@
 {
 {
-  "name": "@esotericsoftware/spine-canvas",
+  "name": "@esotericsoftware/spine-threejs",
   "version": "4.0.1",
   "version": "4.0.1",
   "description": "The official Spine Runtimes for the web.",
   "description": "The official Spine Runtimes for the web.",
   "main": "dist/index.js",
   "main": "dist/index.js",
@@ -37,4 +37,4 @@
     "@types/three": "^0.131.0",
     "@types/three": "^0.131.0",
     "three": "^0.132.0"
     "three": "^0.132.0"
   }
   }
-}
+}