mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-10-28 13:23: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:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update-cli",
|
"name": "react-native-update-cli",
|
||||||
"version": "2.3.0",
|
"version": "2.3.1",
|
||||||
"description": "command line tool for react-native-update (remote updates for react native)",
|
"description": "command line tool for react-native-update (remote updates for react native)",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -256,6 +256,19 @@ async function runReactNativeBundleCommand({
|
|||||||
!isSentry,
|
!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);
|
resolve(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user