/// Homebrew用来安装mac上面软件工具
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
复制代码
brew install node
javascript
注意:安装完node若是用npm安装其余包时进度缓慢能够设置npm镜像:css
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
复制代码
sudo npm install -g react-native-cli
java
去app Store下载便可node
下载地址:www.android-studio.orgreact
监控文件变化
brew install watchman
复制代码
静态的JS类型检查工具(实际开发基本能够忽略)
brew install flow
复制代码
选择Atom做为开发React-native编辑器android
下载地址: atom.ioios
调式工具咱们用Facebook开发的:Nuclidegit
是由Facebook提供的基于atom的集成开发环境,可用于编写、运行和 调试React Native应用,打开Atom Setting界面:es6
/// 用reac-native 初始化而且建立名为ProjectName的React-native项目
react-native init ProjectName
/// cd 到ProjectName目录下下面
npm start /// 启动开发服务器
react-native run ios /// 便可运行在ios模拟器上面
react-native run android /// 便可运行在android模拟器上面
复制代码
我的网站: www.wuhaichao.comgithub