-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul RNW CLI documentation (#947)
## Description This PR does multiple things in order to improve the RNW CLI documentation, including: * Creating separate pages for each CLI command * Updating existing documentation to point to these new pages where appropriate * Updated Getting Started to use the new `init-windows` command * Updated other references to the old `react-native-windows-init` command with links to the new command and changed functionality * Clarified references where we used "React Native Windows CLI" as a generic term when we mean specific commands within the CLI ### Why To improve out documentation in time for the 0.75 release. Resolves microsoft/react-native-windows#13394 ## Screenshots N/A Co-authored-by: Tatiana Kapos <tatianakapos@microsoft.com>
- Loading branch information
1 parent
854904c
commit 8a2f48d
Showing
20 changed files
with
258 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
id: autolink-windows-cli | ||
title: react-native autolink-windows | ||
--- | ||
|
||
This guide will give you more information on the `autolink-windows` command of the React Native Windows CLI. | ||
|
||
## `autolink-windows` | ||
|
||
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 command](run-windows-cli.md), unless the `--no-autolink` argument is used. | ||
|
||
### Usage | ||
Runs Windows-specific autolinking for your RNW project. | ||
|
||
```bat | ||
npx react-native autolink-windows | ||
``` | ||
### Options | ||
|
||
Here are the options that `react-native autolink-windows` takes: | ||
| Option | Input Type | Description | | ||
|-----------------------|------------|--------------------------------------------------| | ||
| `--logging` | boolean | Verbose output logging | | ||
| `--check` | boolean | Only check whether any autolinked files need to change | | ||
| `--sln` | string | Override the app solution file determined by 'react-native config', i.e. `windows\myApp.sln` | | ||
| `--proj` | string | Override the app project file determined by 'react-native config', i.e. `windows\myApp\myApp.vcxproj` | | ||
| `--no-telemetry` | boolean | Disables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI | | ||
| `-h`, `--help` | boolean | Display help for command | | ||
|
||
This sends telemetry to Microsoft by default. You can prevent the telemetry from being sent by using the `--no-telemetry` command line option. See below for more details. | ||
|
||
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 commands. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
id: codegen-windows-cli | ||
title: react-native codegen-windows | ||
--- | ||
|
||
This guide will give you more information on the `codegen-windows` command of the React Native Windows CLI. | ||
|
||
## `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. | ||
|
||
```bat | ||
npx react-native codegen-windows | ||
``` | ||
### Options | ||
|
||
Here are the options that `react-native codegen-windows` takes: | ||
| Option | Input Type | Description | | ||
|-----------------------|------------|--------------------------------------------------| | ||
| `--logging` | boolean | Verbose output logging | | ||
| `--check` | boolean | Only check whether any codegen files need to change | | ||
| `--no-telemetry` | boolean | Disables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI | | ||
| `-h`, `--help` | boolean | Display help for command | | ||
|
||
This sends telemetry to Microsoft by default. You can prevent the telemetry from being sent by using the `--no-telemetry` command line option. See below for more details. | ||
|
||
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 commands. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
id: init-windows-cli | ||
title: react-native init-windows | ||
--- | ||
|
||
This guide will give you more information on the `init-windows` command of the React Native Windows CLI. | ||
|
||
## `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. | ||
|
||
```bat | ||
npx react-native init-windows | ||
``` | ||
### Options | ||
|
||
Here are the options that `react-native init-windows` takes: | ||
| Option | Input Type | Description | | ||
|-----------------------|------------|--------------------------------------------------| | ||
| `--logging` | boolean | Verbose output logging | | ||
| `--template` | string | Specify the template to use | | ||
| `--name` | string | The native project name. Defaults to the name property in `app.json` or `package.json` | | ||
| `--namespace` | string | The native project namespace, expressed using dots as separators, i.e. `Level1.Level2.Level3`. Defaults to the same as name | | ||
| `--overwrite` | boolean | Overwrite any existing files without prompting | | ||
| `--no-telemetry` | boolean | Disables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI | | ||
| `-h`, `--help` | boolean | Display help for command | | ||
|
||
### Templates | ||
|
||
The following templates are available for use with `init-windows` by replacing `--template XYZ`, where `XYZ` can be: | ||
|
||
| Template | Name | | ||
|:-:|:--| | ||
| `cpp-app` | React Native Windows Application (New Arch, C++, Win32, Hermes) | | ||
| `cpp-lib` | React Native Windows Turbo Module (New Arch, C++) | | ||
| `old/uwp-cpp-app` | React Native Windows Application (Old Arch, UWP, C++) | | ||
| `old/uwp-cpp-lib` | React Native Windows Library (Old Arch, UWP, C++) | | ||
| `old/uwp-cs-app` | React Native Windows Application (Old Arch, UWP, C#) | | ||
| `old/uwp-cs-lib` | React Native Windows Library (Old Arch, UWP, C#) | | ||
|
||
This sends telemetry to Microsoft by default. You can prevent the telemetry from being sent by using the `--no-telemetry` command line option. See below for more details. | ||
|
||
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 commands. | ||
|
Oops, something went wrong.