Skip to content

Commit c798cd7

Browse files
committed
Update doc about creating new app
1 parent df728f6 commit c798cd7

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

docs/CreateNewApp.md

+15-21
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,28 @@
44
---
55
## Overview
66

7-
### Create project
8-
React native projects creating goes with the help of command line interface (`react-native-cli` package). `react-native-desktop` adds a modification to that package to support desktop platform.
9-
10-
#### Use modified `react-native-cli` globally
11-
If all the projects you develop need desktop support, you can install modified command line interface globally by following [these steps](./InstallUpdatedReactNativeCLI.md)
12-
13-
After that you create a new project:
7+
#### Create react native project
148
```sh
15-
react-native init DesktopSampleApp
16-
cd DesktopSampleApp
9+
npm install -g react-native-cli
10+
react-native init DesktopSampleApp --version [email protected]
1711
```
1812

19-
#### Use modified `react-native-cli` locally
20-
Alternative and more flexible way is to install original `react-native-cli`:
21-
```sh
22-
npm install -g react-native-cli # Or use Yarn
23-
```
24-
And create project that uses a react-native-desktop repo:
13+
#### Add desktop rnpm plugin
2514
```sh
26-
react-native init DesktopSampleApp --version status-im/react-native-desktop
15+
cd DesktopSampleApp
16+
yarn add git+https://github.com/status-im/rnpm-plugin-desktop-qt.git --dev
2717
```
28-
Since we used original `react-native-cli`, desktop-related files aren't in project yet. So we should initialize them:
18+
RNPM plugin gives you access to a new command that generates desktop files for your project.
19+
20+
21+
#### Generate desktop files
2922
```sh
30-
cd DesktopSampleApp
31-
react-native desktop
23+
react-native desktop-qt
3224
```
25+
This command will add `react-native-desktop-qt` package to your project and generate `desktop` folder with desktop project.
26+
3327

34-
### Run the project
28+
#### Run the project
3529
If you're using macOS, run these commands in 2 different shells (from `DesktopSampleApp` dir):
3630
```sh
3731
npm start #starts bundler
@@ -44,7 +38,7 @@ Afterwards, in a 3rd shell execute:
4438
```sh
4539
react-native run-desktop
4640
```
47-
Compilation of desktop project will start. When it finished and app run you can see following:
41+
Compilation of desktop project will start. Then it will run:
4842

4943
![](./media/react-native-desktop-new-app.png)
5044

0 commit comments

Comments
 (0)