mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-10-29 13:53:11 +08:00
Update version to 2.3.1 in package.json and add support for harmony platform in runReactNativeBundleCommand to handle asset copying and file movement.
This commit is contained in:
@@ -256,6 +256,19 @@ async function runReactNativeBundleCommand({
|
||||
!isSentry,
|
||||
);
|
||||
}
|
||||
if (platform === 'harmony') {
|
||||
const harmonyRawAssetsPath =
|
||||
'harmony/entry/src/main/resources/rawfile/assets';
|
||||
// copy all files in outputFolder to harmonyRawPath
|
||||
// assets should be in rawfile/assets
|
||||
fs.ensureDirSync(harmonyRawAssetsPath);
|
||||
fs.copySync(outputFolder, harmonyRawAssetsPath, { overwrite: true });
|
||||
fs.moveSync(
|
||||
`${harmonyRawAssetsPath}/bundle.harmony.js`,
|
||||
`${harmonyRawAssetsPath}/../bundle.harmony.js`,
|
||||
{ overwrite: true },
|
||||
);
|
||||
}
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user