Mac 配置react native环境
2017-06-08 11:06
405 查看
1.homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2.autojump nvm oh-my-zsh
2.1 autojump
brew install autojump
2.2 oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" vi .zshrc
找到 plugins=(git autojump zsh-nvm)
git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
source .zshrc 生效配置文件
3.nvm 管理node版本 的工具
3.1配置nvm 镜像拉取地址
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
export NVM_IOJS_ORG_MIRROR=http://npm.taobao.org/mirrors/iojs
3.2npm (装完node 会自带一个npm包管理工具)
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
4.yarn
4.1
brew install yarn (类似npm)
4.2 全局安装 react-native-cli
yarn global add react-native-cli
4.3 配置
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global
5.react-native-cli
5.1 全局安装 react-native-cli
yarn global add react-native-cli
6.watchman
brew install watchman
7.flow (可选)
brew install flow
8.iterm2终端
9.用户根目录 cd
Mac 根目录 /
10. 一些常用命令
rm -rf folder
vi files
11. 生成sshkey
ssh-keygen -t rsa
cd .ssh
vi xxx.pub
12.gco = git checkout
gaa = git add .
gcmsg = git commit -m ‘xxxxx’
gba -v = git branch -v
gco -b (xxx) =git checkout -b (xxx)
git push origin (需要推送的本地分支):(目标远程分支)
git push origin :test 删除远程test仓库
git branch -D 删除本地分支
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2.autojump nvm oh-my-zsh
2.1 autojump
brew install autojump
2.2 oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" vi .zshrc
找到 plugins=(git autojump zsh-nvm)
git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
source .zshrc 生效配置文件
3.nvm 管理node版本 的工具
3.1配置nvm 镜像拉取地址
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
export NVM_IOJS_ORG_MIRROR=http://npm.taobao.org/mirrors/iojs
3.2npm (装完node 会自带一个npm包管理工具)
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
4.yarn
4.1
brew install yarn (类似npm)
4.2 全局安装 react-native-cli
yarn global add react-native-cli
4.3 配置
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global
5.react-native-cli
5.1 全局安装 react-native-cli
yarn global add react-native-cli
6.watchman
brew install watchman
7.flow (可选)
brew install flow
8.iterm2终端
9.用户根目录 cd
Mac 根目录 /
10. 一些常用命令
rm -rf folder
vi files
11. 生成sshkey
ssh-keygen -t rsa
cd .ssh
vi xxx.pub
12.gco = git checkout
gaa = git add .
gcmsg = git commit -m ‘xxxxx’
gba -v = git branch -v
gco -b (xxx) =git checkout -b (xxx)
git push origin (需要推送的本地分支):(目标远程分支)
git push origin :test 删除远程test仓库
git branch -D 删除本地分支
相关文章推荐
- 《React Native从急诊到重症监护》-- React Native for mac 环境配置
- 在MAC下配置React-Native开发环境
- 在Mac 上配置 React Native环境相关的基础知识
- mac上配置react-native环境run-ios/run-android命令遇到的问题
- React Native--01 Mac下React Native 环境的配置
- React—native+Android环境搭建和开发配置(Mac)
- React-native 环境配置window端mac端
- React Native MAC下环境配置安装
- Mac环境下的React-Native环境配置流程(主要解决问题Could not install the app on the device)
- Mac环境下react native环境安装与配置
- Mac 下配置react-native 安卓环境中遇到的坑
- React—native+Android环境搭建和开发配置(Mac)
- 【React Native开发】React Native For Android环境配置以及第一个实例(1)
- 配置React Native环境
- React Native 环境配置的搭建
- 深入浅出React Native 1: 环境配置
- react-native环境配置——Android工程搭建
- react native 开发环境配置