Add index.ts for core, scripts for dev and build.

This commit is contained in:
Mario Zechner 2021-08-20 16:59:48 +02:00
parent 2420a2e48a
commit 8831c7d96e
8 changed files with 102 additions and 22 deletions

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ cmake-build-debug/
.vscode/settings.json
spine-runtimes.code-workspace
node_modules
tsconfig.tsbuildinfo
spine-as3/spine-as3/.settings/com.powerflasher.fdt.core.metaDataTags.prefs

View File

@ -24,14 +24,10 @@
"homepage": "https://github.com/esotericsoftware/spine-runtimes#readme",
"private": true,
"workspaces": [
"spine-core/*",
"spine-canvas/*",
"spine-player/*",
"spine-threejs/*",
"spine-webgl/*"
],
"devDependencies": {
"npx": "^10.2.2",
"typescript": "^4.3.5"
}
}
"spine-core",
"spine-canvas",
"spine-player",
"spine-threejs",
"spine-webgl"
]
}

34
spine-ts/spine-core/package-lock.json generated Normal file
View File

@ -0,0 +1,34 @@
{
"name": "@esotericsoftware/spine-core",
"version": "4.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@esotericsoftware/spine-core",
"version": "4.0.1",
"license": "LicenseRef-LICENSE",
"devDependencies": {
"esbuild": "^0.12.21"
}
},
"node_modules/esbuild": {
"version": "0.12.21",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.21.tgz",
"integrity": "sha512-7hyXbU3g94aREufI/5nls7Xcc+RGQeZWZApm6hoBaFvt2BPtpT4TjFMQ9Tb1jU8XyBGz00ShmiyflCogphMHFQ==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
}
}
},
"dependencies": {
"esbuild": {
"version": "0.12.21",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.21.tgz",
"integrity": "sha512-7hyXbU3g94aREufI/5nls7Xcc+RGQeZWZApm6hoBaFvt2BPtpT4TjFMQ9Tb1jU8XyBGz00ShmiyflCogphMHFQ==",
"dev": true
}
}
}

View File

@ -1,8 +1,12 @@
{
"name": "spine-core",
"name": "@esotericsoftware/spine-core",
"version": "4.0.1",
"description": "The official Spine Runtimes for the web.",
"scripts": {},
"main": "build/index.js",
"scripts": {
"build": "rm -rf build; npx tsc -p ./tsconfig.json",
"dev": "npx esbuild src/index.ts --bundle --outfile=../build/spine-core.js --sourcemap --watch"
},
"repository": {
"type": "git",
"url": "git+https://github.com/esotericsoftware/spine-runtimes.git"
@ -21,5 +25,10 @@
"bugs": {
"url": "https://github.com/esotericsoftware/spine-runtimes/issues"
},
"homepage": "https://github.com/esotericsoftware/spine-runtimes#readme"
}
"homepage": "https://github.com/esotericsoftware/spine-runtimes#readme",
"devDependencies": {
"npx": "^10.2.2",
"typescript": "^4.3.5",
"esbuild": "^0.12.21"
}
}

View File

@ -0,0 +1,42 @@
export * from "./Animation";
export * from "./AnimationState";
export * from "./AnimationStateData";
export * from "./AssetManager";
export * from "./AtlasAttachmentLoader";
export * from "./Bone";
export * from "./BoneData";
export * from "./ConstraintData";
export * from "./Event";
export * from "./EventData";
export * from "./IkConstraint";
export * from "./IkConstraintData";
export * from "./PathConstraint";
export * from "./PathConstraintData";
export * from "./Skeleton";
export * from "./SkeletonBinary";
export * from "./SkeletonBounds";
export * from "./SkeletonClipping";
export * from "./SkeletonData";
export * from "./SkeletonJson";
export * from "./Skin";
export * from "./Slot";
export * from "./SlotData";
export * from "./Texture";
export * from "./TextureAtlas";
export * from "./TransformConstraint";
export * from "./TransformConstraintData";
export * from "./Triangulator";
export * from "./Updatable";
export * from "./Utils";
export * from "./VertexEffect";
export * from "./polyfills";
export * from "./attachments/Attachment";
export * from "./attachments/AttachmentLoader";
export * from "./attachments/BoundingBoxAttachment";
export * from "./attachments/ClippingAttachment";
export * from "./attachments/MeshAttachment";
export * from "./attachments/PathAttachment";
export * from "./attachments/PointAttachment";
export * from "./attachments/RegionAttachment";
export * from "./vertexeffects/JitterEffect";
export * from "./vertexeffects/SwirlEffect";

View File

@ -27,10 +27,6 @@
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
interface Math {
fround(n: number): number;
}
(() => {
if (!Math.fround) {
Math.fround = (function (array) {
@ -40,3 +36,5 @@ interface Math {
})(new Float32Array(1));
}
})();
export { }

File diff suppressed because one or more lines are too long

View File

@ -3,12 +3,13 @@
"module": "none",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"preserveConstEnums": true,
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"composite": true,
"esModuleInterop": true,
"isolatedModules": true,
"target": "ES2015"
},
},
}