更改为es2020模块适应Cocos/laya引擎

This commit is contained in:
YHH
2025-06-09 10:42:19 +08:00
parent 35ca1dd7ea
commit ce64de5b3d
8 changed files with 1706 additions and 113 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@esengine/ecs-framework",
"version": "2.1.0",
"version": "2.1.6",
"description": "用于Laya、Cocos等游戏引擎的高性能ECS框架",
"main": "bin/index.js",
"types": "bin/index.d.ts",
@@ -19,7 +19,7 @@
"egret"
],
"scripts": {
"clean": "rimraf bin wasm",
"clean": "rimraf bin wasm dist",
"clean:wasm": "rimraf src/wasm/rust-ecs-core/pkg src/wasm/rust-ecs-core/target",
"build:wasm": "cd src/wasm/rust-ecs-core && wasm-pack build --target web --out-dir ../../../bin/wasm --release",
"build:ts": "tsc",
@@ -27,21 +27,27 @@
"build": "npm run build:wasm && npm run build:ts",
"build:watch": "tsc --watch",
"rebuild": "npm run clean && npm run clean:wasm && npm run build",
"bundle": "npm run build && node scripts/bundle.js",
"compress": "npm run build && node scripts/compress.js",
"package": "npm run bundle && npm run compress",
"build:npm": "npm run build && node scripts/build-single.js",
"test:benchmark": "npm run build && node bin/Testing/Performance/benchmark.js",
"test:unit": "npm run build && node bin/Testing/test-runner.js",
"benchmark": "node scripts/benchmark.js",
"preversion": "npm run rebuild",
"postversion": "npm publish",
"publish:patch": "npm version patch",
"publish:minor": "npm version minor",
"publish:major": "npm version major",
"publish": "npm publish"
"publish:patch": "npm version patch && npm run build:npm && cd dist && npm publish",
"publish:minor": "npm version minor && npm run build:npm && cd dist && npm publish",
"publish:major": "npm version major && npm run build:npm && cd dist && npm publish",
"publish:npm": "npm run build:npm && cd dist && npm publish"
},
"author": "yhh",
"license": "MIT",
"devDependencies": {
"@types/node": "^20.19.0",
"archiver": "^7.0.1",
"esbuild": "^0.25.5",
"rimraf": "^5.0.0",
"terser": "^5.41.0",
"typescript": "^5.8.3"
},
"publishConfig": {
@@ -50,6 +56,5 @@
"repository": {
"type": "git",
"url": "https://github.com/esengine/ecs-framework.git"
},
"optionalDependencies": {}
}
}