New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rnx-kit/cli

Package Overview
Dependencies
Maintainers
7
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rnx-kit/cli

Command-line interface for working with kit packages in your repo

  • 0.9.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.5K
decreased by-12.14%
Maintainers
7
Weekly downloads
 
Created
Source

@rnx-kit/cli

Build npm version

Command-line interface for working with kit packages in your repo.

Bundle a Kit

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]
OverrideDescription
--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-cacheReset the Metro cache.
--config [string]Path to the Metro configuration file.
-h, --helpShow usage information.

Start a Bundle Server

Start a bundle server for a kit package using Metro. The server is controlled by kit configuration and optional command-line overrides.

$ yarn react-native rnx-start [options]
OverrideDescription
--host [string]Host name or address to bind when listening for incoming server requests. When not given, requests from all addresses are accepted.
--port [number]Host port to use when listening for incoming server requests.
--project-root [path]Path to the root of your react-native experience project. The bundle server uses this root path to resolve all web requests.
--watch-folders [paths]Additional folders which will be added to the file-watch list. Comma-separated. By default, Metro watches all project files, and triggers a bundle-reload when anything changes.
--asset-plugins [list]Additional asset plugins to be used by the Metro Babel transformer. Comma-separated list containing plugin modules and/or absolute paths to plugin packages.
--source-exts [list]Additional source-file extensions to include when generating bundles. Comma-separated list, excluding the leading dot.
--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.
--custom-log-reporter-path [string]Path to a JavaScript file which exports a Metro 'TerminalReporter' function. This replaces the default reporter, which writes all messages to the Metro console.
--httpsUse a secure (https) web server. When not specified, an insecure (http) web server is used.
--key [path]Path to a custom SSL private key file to use for secure (https) communication.
--cert [path]Path to a custom SSL certificate file to use for secure (https) communication.
--reset-cacheReset the Metro cache.
--config [string]Path to the Metro configuration file.
--no-interactiveDisables interactive mode.

Manage Kit Dependencies

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 Third-Party Notice for a Kit

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]
OptionDescription
--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.

FAQs

Package last updated on 13 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc