mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
2157fd176d
* worker pool * opt * backup * worker and worker backend * worker fallback * opt * opt * remove meta * opt * worker export * testcase fix * worker js template * worker pal * worker opt * test * Replace error messages with error codes * Package size reduction * Package size reduction * revert * Restore editor asset .meta files to the base branch state Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014HAtWwr4dy5azfpccweh1g * bugfix * Split into two features: Worker and Worker Pool * worker option --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
668 B
JavaScript
25 lines
668 B
JavaScript
require('./ensure-pal.cjs')();
|
|
const { join } = require('path');
|
|
const { emptyDir } = require('fs-extra');
|
|
const { dtsBundler } = require('@cocos/ccbuild');
|
|
const { magenta } = require('chalk');
|
|
|
|
const prefix = ''.padStart(20, '=');
|
|
console.log(magenta(`${prefix} Build declarations ${prefix}`));
|
|
|
|
(async function exec () {
|
|
const PATHS = {
|
|
engine: join(__dirname, '..'),
|
|
out: join(__dirname, '..', 'bin', '.declarations'),
|
|
};
|
|
await emptyDir(PATHS.out);
|
|
|
|
await dtsBundler.build({
|
|
engine: PATHS.engine,
|
|
outDir: PATHS.out,
|
|
withIndex: true,
|
|
withExports: false,
|
|
withEditorExports: true,
|
|
});
|
|
}());
|