最新消息:专注于Java, Android

React Native Console – IDEA 插件

Uncategorized 刘长炯 1558浏览

一键在IDEA终端中运行React Native开发命令.

https://github.com/beansoftapp/react-native-console

React Native Console

an IDEA/WebStorm/Android Studio Plugin for One-Click run React Native commands in embed terminal

Installation

First, please setup your React Native dev env:
https://facebook.github.io/react-native/docs/getting-started.html

Second, install jar file react-native-console.jar as a plugin to your IDE.
The plugin home page is here: https://plugins.jetbrains.com/plugin/9564-react-native-console

Or you can install it through your IDE, bring up Preferences > Plugins > Browse repositories… , search for ‘React Native Console‘,
then you can install this plugin there.

Now just restart and enjoy!

Features

OneClick run following commands:
react-native run-android
react-native link
react-native run-ios
npm run start
npm install
Open dev menu on Android device(adb shell input keyevent 82)
forward android device request to dev machine(adb reverse tcp:8081 tcp:8081)
open React Native debugger ui(Chrome browser required)

react-native log-android
react-native log-ios
gradlew assembleRelease
react-native bundle –platform android/ios –dev false

Auto detect React Native package.json in current folder and parent folder(eg coding Java in Android Studio),
thus the command will auto execute in that folder

Note

Java 8 required to run the IDE.

Only tested on Mac OSX with WebStorm/IDEA/Android Studio.

功能

一键运行下列功能:
react-native run-android
react-native link
react-native run-ios
npm run start
npm install
安卓设备上打开开发菜单(adb shell input keyevent 82)
安卓设备网络请求转发到开发机(adb reverse tcp:8081 tcp:8081)
打开 React Native debugger ui(需要Chrome浏览器)
react-native log-android
react-native log-ios
gradlew assembleRelease
react-native bundle –platform android/ios –dev false

自动在当前目录和父级目录检测 React Native的package.json文件位置(比如在Android Studio中只开发Java代码时), 这样所有的npm相关的命令都会自动在正确的目录执行

ScreenShot

ScreenShot

Demo Gif

转载请注明:WebLogic Android 博客 » React Native Console – IDEA 插件