Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-windows/cli

Package Overview
Dependencies
Maintainers
0
Versions
417
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-windows/cli

CLI to build and run React Native for Windows apps.

  • 0.77.0-preview.1
  • preview
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
decreased by-5.87%
Maintainers
0
Weekly downloads
 
Created
Source

@react-native-windows/cli

CLI to build and run React Native for Windows apps.

The autolink-windows CLI command is used to link the native code and build systems for a React Native for Windows app with any native community modules it uses.

Note: Autolinking runs automatically as part of running the run-windows CLI command, unless the --no-autolink argument is used.

Usage

Runs Windows-specific autolinking for your RNW project.

npx @react-native-community/cli autolink-windows

Options

Here are the options that npx @react-native-community/cli autolink-windows takes:

OptionInput TypeDescription
--loggingbooleanVerbose output logging
--checkbooleanOnly check whether any autolinked files need to change
--slnstringOverride the app solution file determined by 'npx @react-native-community/cli config', i.e. windows\myApp.sln
--projstringOverride the app project file determined by 'npx @react-native-community/cli config', i.e. windows\myApp\myApp.vcxproj
--no-telemetrybooleanDisables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI
-h, --helpbooleanDisplay help for command

codegen-windows

The codegen-windows CLI command is used to generate some necessary Windows-specific native code for native modules.

Usage

Runs Windows-specific codegen for native modules.

npx @react-native-community/cli codegen-windows

Options

Here are the options that npx @react-native-community/cli codegen-windows takes:

OptionInput TypeDescription
--loggingbooleanVerbose output logging
--checkbooleanOnly check whether any codegen files need to change
--no-telemetrybooleanDisables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI
-h, --helpbooleanDisplay help for command

init-windows

The init-windows CLI command is used to initialize a new React Native for Windows project inside an existing React Native project.

Usage

Initializes a new RNW project from a given template.

npx @react-native-community/cli init-windows

Options

Here are the options that npx @react-native-community/cli init-windows takes:

OptionInput TypeDescription
--loggingbooleanVerbose output logging
--templatestringSpecify the template to use
--namestringThe native project name. Defaults to the name property in app.json or package.json
--namespacestringThe native project namespace, expressed using dots as separators, i.e. Level1.Level2.Level3. Defaults to the same as name
--overwritebooleanOverwrite any existing files without prompting
--no-telemetrybooleanDisables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI
-h, --helpbooleanDisplay help for command

run-windows

The run-windows CLI command is used to build and run React Native for Windows apps.

Usage

Builds your RNW app and starts it on a connected Windows desktop, emulator or device.

npx @react-native-community/cli run-windows

Options

Note: Remote Debugging was officially marked as deprecated in RN 0.73 and will be removed in a later release.

Here are the options that npx @react-native-community/cli run-windows takes:

OptionInput TypeDescription
--releasebooleanSpecifies a Release build
--rootstringOverride the root directory for the project which contains the windows folder
--archstringThe build architecture, i.e. ARM64, x86, x64. Defaults to system architecture
--singleprocbooleanDisables multi-proc build
--emulatorbooleanDeploys the app to an emulator
--devicebooleanDeploys the app to a connected device
--targetstringDeploys the app to the specified GUID for a device
--remote-debuggingboolean(Deprecated) Deploys the app in remote debugging mode
--loggingbooleanVerbose output logging
--no-packagerbooleanDo not launch the packager while building
--bundlebooleanEnable Bundle configuration, i.e. ReleaseBundle/DebugBundle rather than Release/Debug
--no-launchbooleanDo not launch the app after deployment
--no-autolinkbooleanDo not run autolinking
--no-buildbooleanDo not build the solution
--no-deploybooleanDo not deploy the app
--deploy-from-layoutbooleanForce deploy from layout even in Release builds
--slnstringOverride the app solution file determined by 'npx @react-native-community/cli config', i.e. windows\myApp.sln
--projstringOverride the app project file determined by 'npx @react-native-community/cli config', i.e. windows\myApp\myApp.vcxproj
--msbuildpropsstringComma separated props to pass to MSBuild, i.e. prop1=value1,prop2=value2
--buildLogDirectorystringOptional directory where MSBuild log files should be stored
--infobooleanDump environment information
--direct-debuggingnumberEnable direct debugging on specified port
--no-telemetrybooleanDisables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI
-h, --helpbooleanDisplay help for command

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

This data collection notice only applies to the process of running the react-native-windows CLI (i.e. the commands above).

FAQs

Package last updated on 20 Dec 2024

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