mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 07:22:38 +08:00
c32c66c511
* Remove "@cocos/build-engine" module, its functionality was moved to "@cocos/ccbuild". * Remove scripts/build-engine directory. * Update package.json * Remove unused run-build-engine.yml file
24 lines
637 B
JavaScript
24 lines
637 B
JavaScript
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,
|
|
});
|
|
}());
|