microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
doc/rncp.md
55lines · modecode
| 1 | ## Using React Native CodePush with current extension |
| 2 | |
| 3 | If you have added [react-native-code-push](https://github.com/Microsoft/react-native-code-push) npm package to your `react-native` project you will be able to make CodePush releases directly from the VSCode. |
| 4 | |
| 5 | *Note*: You should create an app in [Microsoft AppCenter](https://appcenter.ms/) and configure `react-native-code-push` according to [docs](https://github.com/Microsoft/react-native-code-push#getting-started). |
| 6 | |
| 7 | ### Logging in to AppCenter |
| 8 | |
| 9 | To login to Microsoft AppCenter click on CodePush status bar control and execute login |
| 10 | |
| 11 |  |
| 12 | |
| 13 | ### Using React Native CodePush commands |
| 14 | |
| 15 | From the Command Palette use the React Native Code Push:{Command Name} to run the command |
| 16 | |
| 17 |  |
| 18 | |
| 19 | ### Using React Native CodePush from status bar |
| 20 | |
| 21 | When you are logged in to AppCenter mostly used commands will be avaliable when clicking on CodePush status bar control |
| 22 | |
| 23 |  |
| 24 | |
| 25 | ### Using `codepush.json` for CodePush releases |
| 26 | |
| 27 | Please notice that the extension creates `.vscode/codepush.json` file in the project root to store codepush relative data. You could inspect it and change some values manually although we recommend to do it via appropriate `React Native CodePush` commands or via `CodePush` menu in the status bar. |
| 28 | |
| 29 | ``` |
| 30 | { |
| 31 | "userId": "c4217868-8861-45b9-8f22-0ccc29125841", |
| 32 | "userName": "user-name", |
| 33 | "displayName": "display-name", |
| 34 | "email": "test@aaa.com", |
| 35 | "defaultApp": { |
| 36 | "ownerName": "owner-name", |
| 37 | "appName": "app-name", |
| 38 | "identifier": "owner-name/app-name", |
| 39 | "os": "ios", |
| 40 | "targetBinaryVersion": "", |
| 41 | "isMandatory": false, |
| 42 | "currentAppDeployments": { |
| 43 | "codePushDeployments": [ |
| 44 | { |
| 45 | "name": "Staging" |
| 46 | }, |
| 47 | { |
| 48 | "name": "Production" |
| 49 | } |
| 50 | ], |
| 51 | "currentDeploymentName": "Staging" |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | ``` |