microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.11.1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

doc/tasks.md

53lines · modecode

1This is default `tasks.json` for `react-native init` projects.
2Put it into `.vscode` folder in your project.
3
4```
5{
6 "version": "2.0.0",
7 "presentation": {
8 "reveal": "always",
9 "panel": "new"
10 },
11 "tasks": [
12 {
13 "taskName": "Build APK Debug",
14 "group": "build",
15 "type": "shell",
16 "windows": {
17 "command": "cd android; if($?) {./gradlew assembleDebug}"
18 },
19 "linux": {
20 "command": "cd android && ./gradlew assembleDebug"
21 }
22 },
23 {
24 "taskName": "Build APK Release",
25 "group": "build",
26 "type": "shell",
27 "windows": {
28 "command": "cd android; if($?) {./gradlew assembleRelease}"
29 },
30 "linux": {
31 "command": "cd android && ./gradlew assembleRelease"
32 }
33 },
34 {
35 "taskName": "Generate Android Bundle",
36 "group": "build",
37 "type": "shell",
38 "command": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/main.jsbundle"
39 },
40 {
41 "taskName": "Generate iOS Bundle",
42 "group": "build",
43 "type": "shell",
44 "command": "react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle"
45 }
46 ]
47}
48```
49* Note: if you use `react-native@0.48` or lower change `index.js` to `index.ios.js`/`index.android.js` or your own entry-file.
50
51More about `tasks` in VSCode read [here](https://code.visualstudio.com/docs/editor/tasks)
52
53How to [Generating Signed APK](https://facebook.github.io/react-native/docs/signed-apk-android.html)