1 Star 0 Fork 0

yangyn / react-native-console

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

React Native Console

一键执行React Native 命令的 IDEA/WebStorm/Android Studio 插件, 排名第一的 WebStorm / IDEA React Native 开发插件 JetBrains Plugins Downloads

安装

首先, 请按照官方文档搭建 React Native开发环境: https://facebook.github.io/react-native/docs/getting-started.html

然后, 可以在开发工具中安装插件, 依次点开 Preferences > Plugins > Browse repositories... , 搜索 'React Native Console', 然后点击安装即可.

或者
手工下载插件文件 react-native-console.jar 并在IDE的插件设置中选择 Install Plugin from disk. 插件中心的页面地址在这里: https://plugins.jetbrains.com/plugin/9564-react-native-console

重启开发工具即可享受秒开体验!

注意事项

需要 Java 8或更高版本运行开发工具.

设置(可选, 仅当js工程目录无法自动招到时配置)

当js项目的工作目录不在根目录时,例如 ./jsapp , 现在可以从欢迎页面 或者工具栏便捷的修改这个值. 最终的设置值存储于文件 .idea/.rnconsole, 示例内容如下:

{
  currentPath: './jsapp'
}

设置之后所有的 npm 命令都会用这个目录作为启动目录

Linux 用户请注意

如果您点击 "Debug Android" 按钮后出现了如下错误信息: "SDK location not found ", 可以这样修复 : 添加 android 本地配置文件: 应用目录/android/local.properties sdk.dir=/Users/xxxx/Documents/Java/android-sdk-macosx 让 sdk.dir 指向 ANDROID_HOME 环境变量. 如果找不到adb,可以试试如下终端命令(执行一次即可):

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

更多信息参考这个issue: https://github.com/beansoftapp/react-native-console/issues/17

功能

一键运行下列功能:

在项目中打开当前安卓 Activity 的源码(支持主要IDEA开发工具例如 WebStorm, IDEA, Android Studio 等).

运行 React Native Debugger https://github.com/jhen0409/react-native-debugger(仅支持Mac)列出并执行package.json中的scripts定义

react-native run-android
react-native link
react-native run-ios
一键真机运行
列出所有iOS设备(包括模拟器和真机设备)并选中运行
npm run start
npm install
安卓设备上打开开发菜单(adb shell input keyevent 82)
安卓设备网络请求转发到开发机(adb reverse tcp:8081 tcp:8081)
安卓设备重新载入JavaScript
打开 React Native debugger ui(需要Chrome浏览器)

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 添加项目, 开发和全局依赖
npm 添加项目, 开发和全局依赖
自动安装运行 react-devtools

最近编辑位置(主工具栏)
在Finder/Explorer中显示文件(main toolbar)
在Finder/Explorer中显示项目目录
指定JS项目工作目录, 例如 ./jsapp, 通过欢迎屏幕或者工具栏按钮 (可选, 设置后在.idea目录创建文件 .rnconsole , 内容和下面类似:

{
  currentPath: './jsapp'
}

设置之后所有的 npm 命令都会用这个目录作为启动目录

最近更新: 指定JS项目工作目录, 例如 ./jsapp, 可通过欢迎屏幕或者工具栏按钮来完成.

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

##贡献者

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

https://github.com/beansoftapp beansoft@126.com

https://github.com/troublediehard dmportenko@gmail.com

屏幕快照

演示动图

本项目使用免费的 JetBrains. 开源许可开发.

jetbrains

BSD 3-Clause License Copyright (c) 2017~2019, BeanSoft@126.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

an IDEA/WebStorm/Android Studio Plugin for One-Click run React Native commands in embed terminal 展开 收起
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/yyn_0210/react-native-console.git
git@gitee.com:yyn_0210/react-native-console.git
yyn_0210
react-native-console
react-native-console
master

搜索帮助

14c37bed 8189591 565d56ea 8189591