feat(core): 添加module.json和类型定义更新

This commit is contained in:
yhh
2025-12-03 16:20:59 +08:00
parent 37ab494e4a
commit 13cb670a16
25 changed files with 1107 additions and 198 deletions

23
packages/core/module.json Normal file
View File

@@ -0,0 +1,23 @@
{
"id": "core",
"name": "@esengine/ecs-framework",
"displayName": "Core ECS",
"outputPath": "dist/index.mjs",
"description": "Core Entity-Component-System framework | 核心 ECS 框架",
"version": "1.0.0",
"category": "Core",
"icon": "Box",
"tags": ["ecs", "entity", "component", "system"],
"isCore": true,
"defaultEnabled": true,
"isEngineModule": true,
"canContainContent": false,
"platforms": ["web", "desktop", "mobile"],
"dependencies": [],
"exports": {
"components": ["Component", "Transform"],
"systems": ["System"],
"other": ["World", "Entity", "EntityManager", "SystemManager"]
},
"requiresWasm": false
}

View File

@@ -30,10 +30,10 @@
"clean": "rimraf bin dist tsconfig.tsbuildinfo",
"build:ts": "tsc",
"prebuild": "npm run clean",
"build": "npm run build:ts",
"build": "npm run build:ts && node build-rollup.cjs",
"build:watch": "tsc --watch",
"rebuild": "npm run clean && npm run build",
"build:npm": "npm run build && node build-rollup.cjs",
"build:npm": "npm run build",
"test": "jest --config jest.config.cjs",
"test:watch": "jest --watch --config jest.config.cjs",
"test:performance": "jest --config jest.performance.config.cjs",

View File

@@ -70,7 +70,7 @@ module.exports = [
warn(warning);
},
treeshake: {
moduleSideEffects: false,
moduleSideEffects: (id) => id.includes('reflect-metadata'),
propertyReadSideEffects: false,
unknownGlobalSideEffects: false
}
@@ -102,7 +102,7 @@ module.exports = [
warn(warning);
},
treeshake: {
moduleSideEffects: false
moduleSideEffects: (id) => id.includes('reflect-metadata')
}
},
@@ -133,7 +133,7 @@ module.exports = [
warn(warning);
},
treeshake: {
moduleSideEffects: false
moduleSideEffects: (id) => id.includes('reflect-metadata')
}
},
@@ -193,10 +193,10 @@ module.exports = [
warn(warning);
},
treeshake: {
moduleSideEffects: false
moduleSideEffects: (id) => id.includes('reflect-metadata')
}
},
// 类型定义构建
{
input: 'bin/index.d.ts',