MCPcopy Create free account
hub / github.com/cocos/cocos-engine / bundleRuntimeAdapter

Function bundleRuntimeAdapter

scripts/build-adapter.js:75–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73}
74
75async function bundleRuntimeAdapter () {
76 const platformsPath = ps.join(engineRoot, 'platforms/runtime/platforms');
77 const platforms = getPlatformsFromPath(platformsPath);
78 console.log(green(`\nBundling runtime platform adapters, including: ${platforms}`));
79 for (const platform of platforms) {
80 console.log(`handle platform: ${green(platform)}`);
81 // bundle engine-adapter.js
82 const engineEntry = normalizePath(ps.join(engineRoot, `platforms/runtime/platforms/${platform}/engine/index.js`));
83 const engineOutput = normalizePath(ps.join(engineRoot, `bin/adapter/runtime/${platform}/engine-adapter.js`));
84 await bundle(engineEntry, engineOutput, true);
85 }
86}
87
88function normalizePath (path) {
89 return path.replace(/\\/g, '/');

Callers 1

build-adapter.jsFile · 0.85

Calls 5

getPlatformsFromPathFunction · 0.85
bundleFunction · 0.85
joinMethod · 0.80
logMethod · 0.80
normalizePathFunction · 0.70

Tested by

no test coverage detected