| 50 | }; |
| 51 | |
| 52 | const buildTypeScript = async () => { |
| 53 | exec('node node_modules/typescript/bin/tsc --noEmit false --outDir ../../../Package/Assembled', '../Modules/@babylonjs/react-native'); |
| 54 | |
| 55 | // Update the 'main' property in package.json to be 'index.js' instead of 'index.ts' |
| 56 | const packageJson = JSON.parse(fs.readFileSync('Assembled/package.json')); |
| 57 | |
| 58 | const parsedMain = path.parse(packageJson.main); |
| 59 | if (parsedMain.ext === '.ts') { |
| 60 | packageJson.main = path.join(parsedMain.dir, `${parsedMain.name}.js`); |
| 61 | } |
| 62 | |
| 63 | fs.writeFileSync('Assembled/package.json', JSON.stringify(packageJson, null, 4)); |
| 64 | }; |
| 65 | |
| 66 | const buildIphoneOS = async () => { |
| 67 | exec('xcodebuild -sdk iphoneos -configuration Release -workspace BRNPlayground.xcworkspace -scheme Playground build CODE_SIGNING_ALLOWED=NO', '../Apps/Playground/ios'); |