Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d8cadf2
refactor(engine): 重构2D渲染管线坐标系统
esengine Nov 21, 2025
7256c12
feat(engine): 完善2D渲染管线和编辑器视口功能
esengine Nov 21, 2025
284318c
feat(editor): 实现Viewport变换工具系统
esengine Nov 21, 2025
a888a21
feat(editor): 优化Inspector渲染性能并修复Gizmo变换工具显示
esengine Nov 22, 2025
45f5226
feat(editor): 实现Run on Device移动预览功能
esengine Nov 22, 2025
17e7ac2
feat(editor): 添加组件属性控制和依赖关系系统
esengine Nov 22, 2025
92f7b34
feat(editor): 实现动画预览功能和优化SpriteAnimator编辑器
esengine Nov 23, 2025
0faa936
feat(editor): 修复SpriteAnimator动画预览功能并迁移CI到pnpm
esengine Nov 23, 2025
57bdfa2
feat(editor): 修复SpriteAnimator动画预览并迁移到pnpm
esengine Nov 23, 2025
9672c3a
feat(editor): 修复SpriteAnimator动画预览并迁移到pnpm
esengine Nov 23, 2025
ac71dee
feat(editor): 修复SpriteAnimator动画预览并迁移到pnpm
esengine Nov 23, 2025
cf67dab
feat(editor): 修复SpriteAnimator动画预览并迁移到pnpm
esengine Nov 23, 2025
7b6b90a
feat(ci): 迁移项目到pnpm并修复CI构建问题
esengine Nov 23, 2025
c5238f7
chore: 迁移CI工作流到pnpm并添加WASM构建支持
esengine Nov 23, 2025
5bb1a0a
chore: 迁移CI工作流到pnpm并添加WASM构建支持
esengine Nov 23, 2025
8840a4a
chore: 迁移CI工作流到pnpm并添加WASM构建支持
esengine Nov 23, 2025
1d11cc0
chore: 迁移CI工作流到pnpm并添加WASM构建支持
esengine Nov 23, 2025
e28bbd0
chore: 迁移CI工作流到pnpm并添加WASM构建支持
esengine Nov 23, 2025
1ff05a8
chore: 迁移CI工作流到pnpm并添加WASM构建支持
esengine Nov 23, 2025
5fdbcb0
chore: 移除 network 相关包
esengine Nov 23, 2025
988fba4
chore: 移除 network 相关包
esengine Nov 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 55 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths:
- 'packages/**'
- 'package.json'
- 'package-lock.json'
- 'pnpm-lock.yaml'
- 'tsconfig.json'
- 'jest.config.*'
- '.github/workflows/ci.yml'
Expand All @@ -15,46 +15,77 @@ on:
paths:
- 'packages/**'
- 'package.json'
- 'package-lock.json'
- 'pnpm-lock.yaml'
- 'tsconfig.json'
- 'jest.config.*'
- '.github/workflows/ci.yml'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Build core package first
run: npm run build:core
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Build platform-common for type declarations
run: cd packages/platform-common && npm run build
- name: Install wasm-pack
run: cargo install wasm-pack

- name: Build core package first
run: pnpm run build:core

- name: Build engine WASM package
run: |
cd packages/engine
pnpm run build

- name: Copy WASM files to ecs-engine-bindgen
run: |
mkdir -p packages/ecs-engine-bindgen/src/wasm
cp packages/engine/pkg/es_engine.js packages/ecs-engine-bindgen/src/wasm/
cp packages/engine/pkg/es_engine.d.ts packages/ecs-engine-bindgen/src/wasm/
cp packages/engine/pkg/es_engine_bg.wasm packages/ecs-engine-bindgen/src/wasm/
cp packages/engine/pkg/es_engine_bg.wasm.d.ts packages/ecs-engine-bindgen/src/wasm/

- name: Build dependent packages for type declarations
run: |
cd packages/platform-common && pnpm run build
cd ../asset-system && pnpm run build
cd ../components && pnpm run build

- name: Build ecs-engine-bindgen
run: |
cd packages/ecs-engine-bindgen && pnpm run build

- name: Type check
run: npm run type-check
run: pnpm run type-check

- name: Lint check
run: npm run lint
run: pnpm run lint

- name: Run tests with coverage
run: npm run test:ci
run: pnpm run test:ci

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
continue-on-error: true # 即使失败也继续
continue-on-error: true
with:
file: ./coverage/lcov.info
flags: unittests
Expand All @@ -64,25 +95,30 @@ jobs:
build:
runs-on: ubuntu-latest
needs: test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Build project
run: npm run build
run: pnpm run build

- name: Build npm package
run: npm run build:npm
run: pnpm run build:npm

- name: Upload build artifacts
uses: actions/upload-artifact@v4
Expand All @@ -91,4 +127,4 @@ jobs:
path: |
bin/
dist/
retention-days: 7
retention-days: 7
15 changes: 10 additions & 5 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,34 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Run tests with coverage
run: |
cd packages/core
npm run test:coverage
pnpm run test:coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
continue-on-error: true # 即使失败也继续
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/core/coverage/coverage-final.json
flags: core
name: core-coverage
fail_ci_if_error: false # 不因为 Codecov 失败而失败 CI
fail_ci_if_error: false
verbose: true

- name: Upload coverage artifact
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache: 'pnpm'

- name: Install commitlint
run: |
npm install --save-dev @commitlint/config-conventional @commitlint/cli
pnpm add -D @commitlint/config-conventional @commitlint/cli

- name: Validate PR commits
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
15 changes: 10 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,31 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache: 'pnpm'

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Build core package
run: npm run build:core
run: pnpm run build:core

- name: Generate API documentation
run: npm run docs:api
run: pnpm run docs:api

- name: Build documentation
run: npm run docs:build
run: pnpm run docs:build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/release-editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache: 'pnpm'

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -57,13 +62,12 @@ jobs:
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install frontend dependencies
run: npm ci
run: pnpm install

- name: Update version in config files (for manual trigger)
if: github.event_name == 'workflow_dispatch'
run: |
cd packages/editor-app
# 临时更新版本号用于构建(不提交到仓库)
npm version ${{ github.event.inputs.version }} --no-git-tag-version
node scripts/sync-version.js

Expand All @@ -79,30 +83,30 @@ jobs:
${{ runner.os }}-ts-build-

- name: Build core package
run: npm run build:core
run: pnpm run build:core

- name: Build editor-core package
run: |
cd packages/editor-core
npm run build
pnpm run build

- name: Build behavior-tree package
run: |
cd packages/behavior-tree
npm run build
pnpm run build

- name: Install wasm-pack
run: cargo install wasm-pack

- name: Build engine package (Rust WASM)
run: |
cd packages/engine
npm run build
pnpm run build

- name: Build ecs-engine-bindgen package
run: |
cd packages/ecs-engine-bindgen
npm run build
pnpm run build

- name: Build Tauri app
uses: tauri-apps/tauri-action@v0.5
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,26 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Build core package (if needed)
if: ${{ github.event.inputs.package == 'behavior-tree' || github.event.inputs.package == 'editor-core' }}
run: |
cd packages/core
npm run build
pnpm run build

# - name: Run tests
# run: |
Expand All @@ -78,7 +83,7 @@ jobs:
- name: Build package
run: |
cd packages/${{ github.event.inputs.package }}
npm run build:npm
pnpm run build:npm

- name: Publish to npm
env:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Build core package
run: |
cd packages/core
npm run build:npm
pnpm run build:npm

- name: Check bundle size
uses: andresz1/size-limit-action@v1
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ logs/
coverage/
*.lcov

# 包管理器锁文件(保留npm的,忽略其他的
# 包管理器锁文件(忽略yarn,保留pnpm
yarn.lock
pnpm-lock.yaml
package-lock.json

# 文档生成
docs/api/
Expand Down
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export default [
'examples/lawn-mower-demo/**',
'extensions/**',
'**/*.min.js',
'**/*.d.ts'
'**/*.d.ts',
'**/wasm/**'
]
}
];
Loading
Loading