1. 程式人生 > >react-native相關命令集

react-native相關命令集

1. npm

1. npm info react-native:檢視react-native所有版本資訊;

2. npm uninstall react-native:解除安裝react-native;

3. npm install --save [email protected]:安裝指定版本react-native;

4. npm install:安裝最新版react-native

5. npm update -g react-native-cli:更新版本命令 

2反應原生

1. react-native -h:檢視react-native所有命令;

2. react-native -V:檢視react-native版本號;

3. react-native --version:檢視react-natie-cli版本號;

4. react-native init projectName:建立專案

5 react-native init projectName --version 0.55.4:建立指定版本的react-native專案;

6. react-native start:開啟Metro Bundler(web伺服器)服務

7. react-native run-ios / run-android:構建App並執行到iOS或Android模擬器;

8. react-native new-library [options]:生成一個native-library橋

react-native new-library -h:檢視new-library的引數;

  1. Options:

  2.   --name <string>    name of the library to generate (default: null)

  3.   --config [string]  Path to the CLI configuration file

  4.   -h, --help         output usage information

9:react-native bundle [options]:構建離線JavaScript bundle資料傳遞包;

10:react-native eject [options]:重新設定react-native-cli路徑

  1. Options:

  2. --config [string] Path to the CLI configuration file

  3. -h, --help output usage information

11:反應原生資訊 

  1. Options:

  2. --packages [string] Which packages from your package.json to include, in addition to the default React Native and R

  3. eact versions. (default: react,react-native)

  4. --config [string] Path to the CLI configuration file

  5. -h, --help output usage information

  6. Example usage:

  7. Get standard version info:

  8. react-native info

  9. Get standard version info & specified package versions:

  10. react-native info --packages jest,eslint,babel-polyfill

12:react-native install [options]:安裝和連線本地環境

  1. react-native install [options] <packageName>

  2. install and link native dependencies

  3. Options:

  4. --config [string] Path to the CLI configuration file

  5. -h, --help output usage information

13:react-native uninstall [options]:解除安裝和不連線本地環境

14:react-native upgrade [options]:升級專案模版檔案

15:react-native log-android / log-ios [options]:啟動Android / iOS日誌輸出

16:react-native依賴項:安裝環境資訊列表
   

  1. Options:

  2. --entry-file <path> Absolute path to the root JS file

  3. --output [path] File name where to store the output, ex. /tmp/dependencies.txt

  4. --platform [extension] The platform extension used for selecting modules

  5. --transformer [path] Specify a custom transformer to be used

  6. --max-workers [number] Specifies the maximum number of workers the worker-pool will spawn for transfo

  7. his defaults to the number of the cores available on your machine.

  8. --dev [boolean] If false, skip all dev-only code path (default: true)

  9. --verbose Enables logging

  10. --config [string] Path to the CLI configuration file

  11. -h, --help output usage information

CSDN 原文:https://blog.csdn.net/niuba123456/article/details/81951702?utm_source=copy 

相關推薦

react-native相關命令

1. npm 1. npm info react-native:檢視react-native所有版本資訊; 2. npm uninstall react-native:解除安裝react-native; 3. npm install --save [email 

React Native 常用命令或快捷鍵合

命令: react-native init “專案名稱” : 執行React Native的初始化命令,建立一個專案 npm install : 需要在工程目錄下用此命令將依賴包下載下來 iOS快捷鍵: 蘋果鍵+R(模擬器) : 模擬器reload

React-Native 常用命令

1. 建立新的專案     a. 建立最新穩定版本RN        react-native init [Project Name]    b. 建立指定RN版本的專案       npm i -g rninit  rninit init [Project Nam

[RN] React Native 常用命令

package ack html ins module ati span mod 指定 [RN] React Native 常用命令行 1、查看當前版本 react-native --version 或 react-native -v 2、創建指定版本的Rea

React-Native成到已有項目中的總結

could not rom 浮窗 js文件 命令行 led align nba handle 安裝Python 從官網下載並安裝python 2.7.x(3.x版本不行) 安裝node.js 從官網下載node.js的官方V6.X.X版本或更高版本。安裝完成後

Angular團隊公布路線圖,並演示怎樣與React Native

content ogl date pda andro 演講稿 服務 團隊 stat 本文來源於我在InfoQ中文站翻譯的文章,原文地址是:http://www.infoq.com/cn/news/2015/06/angular-2-react-native-roadmap

Windows版本搭建安裝React Native環境配置及相關問題

for undle 地址 data dmi tools github spa start http://www.cnblogs.com/aichenxy/p/5971613.html 此文檔整理參考地址: http://www.lcode.org/%E5%8F%B2%E4%

React-Native 成個推,需要註意的地方

activit ive 方法 手動 creat nac activity ati push 1, 安卓,可能需要手動寫覆蓋onCreate的方法 註意: 有可能您的MainActivity中未重寫onCreate方法,如果未重寫,請重寫onCreate方法,方法如下

react-native-wechat

app 技術分享 http target .com bsp 集成 詳情 blog 要想集成react-native-wechat,首先需要去微信開放平臺申請一個appID。 沒有微信開發者賬號就去註冊一個,登錄之後進入首頁點擊管理中心--->創建移動應用 然後

react-native android 運行命令

ble 一次 debug模式 adl modules release assembler all g模式 debug模式運行 sudo react-native run-android release模式運行 sudo react-native run-android --

react-native-baidu-map iOS端

.com clas flow info tac ios端 code method reac 沒什麽好說的,推薦一篇文章https://www.jianshu.com/p/eceb7e66fa5e?appinstall=0, 這裏面寫的挺好的,就是做完之後,有一些遇到的小問

React-native成tfs自動發版問題

技術 分享圖片 http 蘋果 inf 技術分享 導入 alt 目錄 前提是蘋果開發者賬號是企業賬號,用mac本地打包成ipa是沒有問題的,提交到tfs自動發版就有問題,這兩個庫沒有導入進來,原因是路徑不對了。 解決方法:   找的本地庫的位置,拷貝到自動發版的目錄下,就能

react-native :command not found 在別的路徑不能使用react-native命令解決

1. 在終端輸入命令: sudo npm install -g react-native-cli  出現的一個類似:/usr/......的路徑記錄下路,這裡叫做路徑A 2.使用vim命令 輸入:vim ~/.bash_profile     &nbs

React-Native開發過程中遇到的一些報錯以及一些常用命令

1、升級node(對安裝包安裝或者低版本的如6.11.4不生效) 1>檢視node版本,沒安裝的請先安裝;  $  node -v 2>清除node快取; $  sudo npm cache clean -f  3>安裝node版本管理工具'n';

安裝react-native命令和建立

安裝react-native命令列工具react-native-cli 1)   在命令列中進入你希望RN安裝的目錄 2)   輸入git clone https://github.com/facebook/react-native.git 3)   進入剛剛目錄下的react-native目錄下的react

關於初次搭建環境第一次執行react-native run-android命令報錯問題

在打開了Genymotion模擬器後執行react-native run-android命令是到最後的app:installDebug爆粗了,如下: 這裡需要修改下Genymotion的ADB配置

東方耀 手把手教React Native實戰開發視訊 1-237

課程式號標題第0課0、手把手教React Native實戰之開山篇_視訊第1課1、手把手教React Native實戰之環境搭建_視訊_Windows環境第1課1、手把手教React Native實戰之環境搭建【Mac真機】同時除錯開發Android&IOS第2課2、

mac下搭建安卓native開發環境(供rn使用),及rn相關命令

A:搭建安卓native開發環境在http://www.android-studio.org/下載最新的as,按步驟操作,新建工程,會去下載安裝一些gradle相關的東西;還有一些sdk和模擬器可能也需要手動安裝和建立。as的執行依賴於jdk,如果你的mac沒有安裝jdk需要

android真機執行命令react-native run-android報以下錯誤

執行命令react-native run-android報以下錯誤 unable to load script from assets ‘index.android bundle’ ,make sure your bundle is packaged cor

react-native開發異常處理——react-native run-android命令報錯

react-native學習交流QQ群:806870562在終端使用命令react-native run-android報錯,如下圖所示:其中說到No connected devices!,我便猜測是不