()
| 73 | } |
| 74 | |
| 75 | async 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 | |
| 88 | function normalizePath (path) { |
| 89 | return path.replace(/\\/g, '/'); |
no test coverage detected