Command-line interface for working with kit
packages in your repo.
Bundle a kit
package using Metro. The
bundling process is controlled by
kit configuration
and optional command-line overrides.
$ yarn react-native rnx-bundle [options]
Override | Description |
---|---|
--id <id> | Target bundle definition. This is only needed when the kit configuration has multiple bundle definitions. |
--platform <ios | android | windows | win32 | macos > |
Target platform. When not given, all platforms in the kit configuration are bundled. |
--entry-path <file> | Path to the root JavaScript file, either absolute or relative to the kit package. |
--dist-path <path> | Path where the bundle is written, either absolute or relative to the kit package. |
--assets-path <path> | Path where bundle assets like images are written, either absolute or relative to the kit package. |
--bundle-prefix <prefix> | Bundle file prefix. This is followed by the platform and bundle file extension. |
--bundle-encoding <utf8 | utf16le | ascii > |
Character encoding to use when writing the bundle file. |
--dev <boolean> | If false, warnings are disabled and the bundle is minified (default: true). |
--minify <boolean> | Controls whether or not the bundle is minified. Disabling minification is useful for test builds. |
--experimental-tree-shake <boolean> | Controls whether or not the bundle is tree shaken. Enabling it turns on dead-code elimination, potentially making the bundle smaller. This feature is experimental. |
--max-workers <number> | Specifies the maximum number of parallel worker threads to use for transforming files. This defaults to the number of cores available on your machine. |
--sourcemap-output <string> | Path where the bundle source map is written, either absolute or relative to the dist-path. |
--sourcemap-sources-root <string> | Path to use when relativizing file entries in the bundle source map. |
--reset-cache | Reset the Metro cache. |
--config <string> | Path to the Metro configuration file. |
-h, --help | Show usage information. |
Manage your kit
package's dependencies.
$ yarn react-native rnx-dep-check [options] [/path/to/package.json]
Refer to @rnx-kit/dep-check for details.
Generate a 3rd-party notice, which is an aggregation of all the LICENSE files
from your kit
package's dependencies.
NOTE: A 3rd-party notice is a legal document. You are solely responsble for its content, even if you use
@rnx-kit
to assist you in generating it. You should consult with an attorney to ensure your notice meets all legal requirements.
$ yarn react-native rnx-write-third-party-notices [options]
Option | Description |
---|---|
--source-map-file [file] | The source map file associated with the kit package's entry file. This source map eventually leads to all kit dependencies. |
--output-file [file] | The path to use when writing the 3rd-party notice file. |
--root-path [path] | The root of the repo. This is the starting point for finding each module in the source map dependency graph. |
--ignore-scopes [string] | Comma-separated list of npm scopes to ignore when traversing the source map dependency graph. |
--ignore-modules [string] | Comma-separated list of modules to ignore when traversing the source map dependency graph. |
--preamble-text [string] | A string to prepend to the start of the 3rd-party notice. |
--additional-text [path] | A string to append to the end of the 3rd-party notice. |