• Stars
    star
    184
  • Rank 208,394 (Top 5 %)
  • Language
    Java
  • License
    BSD 3-Clause "New...
  • Created over 7 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

React Native Console

Note:

This branch only contains the free version source code, also includes code that using the InlayProvider for display in code editor to show usages for a JavaScript function. you need add javascript-openapi.jar and JavaScriptLanguage.jar to project's classpath and mark it as provided.

My code mainly based on IJ source code at com.intellij.codeInsight.daemon.impl.JavaCodeVisionProvider, please using git history for what's added for this function.

Please using the react-native-console-free.jar to test in IJ Ultimate or WebStorm with a React or React Native project.

The preferences will show a JavaScript Inlay option for Usages.

Screenshot:


An IDEA/WebStorm/Android Studio Plugin for run React Native commands, the No.1 WebStorm / IDEA plugin for React Native developers.

https://plugins.jetbrains.com/plugin/9564-react-native-console

JetBrains Plugins Downloads Rating Vistor

Chinese Instruction Here

Installation

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

Second, 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.

Or you can munally install jar file react-native-console.jar as a plugin to your IDE. And the plugin home page is here: https://plugins.jetbrains.com/plugin/9564-react-native-console

Now restart IDEA and enjoy!

Free version

Since I didn't have much time on the free version plugin, you can download and install from local disk: https://github.com/beansoft/react-native-console/releases/download/2020.3/react-native-console-free.jar

Note

Java 8 or plus required to run the IDE.

Settings(Optional, only need if js project dir can't be auto find)

Specify js project work directory rather than root directory, eg ./jsapp , now can from welcome screen or toolbar to edit this property. And the final value is stored in a file named .idea/.rnconsole, which content should like this:

{
  currentPath: './jsapp'
}

after that all npm commands will use this as the working dir.

Linux Users PLEASE README FIRST

If you found issue when click on the "Debug Android" button, error message: "SDK location not found ", please fix it like this : add a android local config file: yourapp/android/local.properties sdk.dir=/Users/xxxx/Documents/Java/android-sdk-macosx let sdk.dir point to your ANDROID_HOME environment if can't find adb, try this shell command:

sudo ln -s ~/Android/Sdk/platform-tools/adb /usr/bin/adb

More info please ref this issue: #17

Features

  • open current Android activity source code in project
  • run React Native Debugger https://github.com/jhen0409/react-native-debugger(Mac Only)
  • Ctrl + F2 to reload android js bundle
  • list and run scripts in package.json
  • react-native run-android
  • list all connected android devices(includes simulator and physical) and run as target
  • react-native link
  • react-native run-ios
  • run on physical iOS device
  • list all iOS devices(includes simulator and physical) and run as target
  • 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)
  • Android Reloading JavaScript
  • 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
  • yarn
  • jest
  • react-native uninstall
  • react-native start
  • gradlew clean
  • react-native react-native-git-upgrade
  • yarn add project, dev, global dependencies
  • npm add project, dev, global dependencies
  • auto install and run react-devtools
  • Last Edit Location(main toolbar)
  • Reveal file in Finder/Explorer(main toolbar)
  • Reveal project folder in Finder/Explorer
  • Specify js project work directory, eg ./jsapp, from welcome screen or toolbar (optional, see https://github.com/beansoftapp/react-native-console for more info)
  • Modify Metro Bundler port(need React Native 0.56+)
  • Auto detect React Native package.json or build.gradle in current folder and parent/children folder(eg only coding Java in Android Studio), thus the command will auto execute in the correct folder

##Contributors

https://github.com/facebook/react-native/commit/33d710e8c58ef1dc69816a59ac1cf390894e7cb9

ScreenShot

Demo Gif

This project is developed using IntelliJ IDEA and WebStorm with a free JetBrains Open Source license.

jetbrains

More Repositories

1

visualgc_jdk8

The VisualGC 3.0 standalone version with enhancement for HotSpot JDK 8(独立运行版, 支持JDK 8, 增强了部分功能)
Shell
30
star
2

visualgc_java8

Visualgc patch for Java 8+ and visualgc for IDEA
Java
24
star
3

wallegui

Walle(瓦力)新一代渠道包打包神器的界面版本, 高度Mac集成.
Java
19
star
4

intellij-platform-plugin-template-proguard

IntelliJ Platform Plugin Template with Proguard config
Java
12
star
5

asm-example

A Android ASM example 隐私合规检测与处理
Kotlin
9
star
6

umeng-muti-channel-build-tool-java

友盟渠道打包工具(Windows,Linux,Mac, 纯Java)
Java
8
star
7

intellij-stop-index-plugin

JetBrains IDE索引杀手插件
Kotlin
7
star
8

poplayer

电商应用中常见的透明浮层网页的Android端代码实现
CSS
6
star
9

idea-docs

IDEA插件开发中文文档
Java
6
star
10

flutter-storm-support

🧩 a WebStorm/PhpStorm/GoLand plugin for developing Flutter applications
4
star
11

iscratch-support

Supports for the Notes IDEA plugin
3
star
12

intellij-plugin-compatibility

A shared intellij plugin compatibility library
Java
2
star
13

BAndroidRouter

BAndroidRouter is an multi module enabled router library and in-app data transfer framework. 多模块路由总线和数据交换框架.
Java
1
star
14

jetbrains

JetBrains 码上道 IDEA Plugin 开发教程直播文档
HTML
1
star
15

visualgc_idea

An IDEA plugin which displays a Visual GC tool window inside your IDE. 在IDEA中显示 VisualGC 工具窗口.
Java
1
star
16

DarculaJdk6

Darcula Look and Feel for JDK 6+
Java
1
star
17

beansoft.github.io.bak

blog home page
CSS
1
star
18

intellij-ide-helper-plugin

IDE Helper plugin for JetBrains IDE
Kotlin
1
star