mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 21:27:46 +00:00
Remove RFC-0759 ram-bundle command from cli (#43292)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43292 The ram-bundle command isn't necessary now that Hermes is our default VM. The RFC specifically calls for the CLI command to be removed [1]. [1] https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0759-react-native-frameworks.md#commands-to-be-removed Changelog: [General][Removed] - RFC-0759 remove ram-bundle command. Reviewed By: NickGerleman, cipolleschi Differential Revision: D54430289 fbshipit-source-id: 49d519c007b739f89ffe9032fec905c56ea49f4a
This commit is contained in:
parent
6461dcd07b
commit
58b45e86a6
@ -69,24 +69,6 @@ npx react-native bundle --entry-file <path> [options]
|
||||
| `--read-global-cache` | Attempt to fetch transformed JS code from the global cache, if configured. Defaults to `false`. |
|
||||
| `--config <string>` | Path to the CLI configuration file. |
|
||||
|
||||
### `ram-bundle`
|
||||
|
||||
Build the [RAM bundle](https://reactnative.dev/docs/ram-bundles-inline-requires) for the provided JavaScript entry file.
|
||||
|
||||
#### Usage
|
||||
|
||||
```sh
|
||||
npx react-native ram-bundle --entry-file <path> [options]
|
||||
```
|
||||
|
||||
#### Options
|
||||
|
||||
Accepts all options supported by [`bundle`](#bundle) and the following:
|
||||
|
||||
| Option | Description |
|
||||
| - | - |
|
||||
| `--indexed-ram-bundle` | Force the "Indexed RAM" bundle file format, even when building for Android. |
|
||||
|
||||
## Contributing
|
||||
|
||||
Changes to this package can be made locally and tested against the `rn-tester` app, per the [Contributing guide](https://reactnative.dev/contributing/overview#contributing-code). During development, this package is automatically run from source with no build step.
|
||||
|
@ -1,38 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import type {BundleCommandArgs} from '../bundle';
|
||||
import type {Command, Config} from '@react-native-community/cli-types';
|
||||
|
||||
import bundleCommand from '../bundle';
|
||||
import buildBundle from '../bundle/buildBundle';
|
||||
import metroRamBundle from 'metro/src/shared/output/RamBundle';
|
||||
|
||||
const ramBundleCommand: Command = {
|
||||
name: 'ram-bundle',
|
||||
description:
|
||||
'Build the RAM bundle for the provided JavaScript entry file. See https://reactnative.dev/docs/ram-bundles-inline-requires.',
|
||||
func: (argv: Array<string>, config: Config, args: BundleCommandArgs) => {
|
||||
return buildBundle(argv, config, args, metroRamBundle);
|
||||
},
|
||||
options: [
|
||||
// $FlowFixMe[incompatible-type] options is nonnull
|
||||
...bundleCommand.options,
|
||||
{
|
||||
name: '--indexed-ram-bundle',
|
||||
description:
|
||||
'Force the "Indexed RAM" bundle file format, even when building for android',
|
||||
default: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default ramBundleCommand;
|
@ -10,7 +10,6 @@
|
||||
*/
|
||||
|
||||
export {default as bundleCommand} from './commands/bundle';
|
||||
export {default as ramBundleCommand} from './commands/ram-bundle';
|
||||
export {default as startCommand} from './commands/start';
|
||||
|
||||
export {unstable_buildBundleWithConfig} from './commands/bundle/buildBundle';
|
||||
|
@ -13,7 +13,6 @@ const android = require('@react-native-community/cli-platform-android');
|
||||
const ios = require('@react-native-community/cli-platform-ios');
|
||||
const {
|
||||
bundleCommand,
|
||||
ramBundleCommand,
|
||||
startCommand,
|
||||
} = require('@react-native/community-cli-plugin');
|
||||
|
||||
@ -49,7 +48,6 @@ module.exports = {
|
||||
...ios.commands,
|
||||
...android.commands,
|
||||
bundleCommand,
|
||||
ramBundleCommand,
|
||||
startCommand,
|
||||
codegenCommand,
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user