ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

mac 前端环境搭建 homebrew nvm oh-my-zsh code.

2022-01-14 23:01:49  阅读:61  来源: 互联网

标签:安装 code oh com sh git homebrew nvm zsh


安装xcode-select

xcode-select --install

安装homebrew

https://cloud.tencent.com/developer/article/1853162

Brew 替换为国内源Mac

替换brew.git

cd "$(brew --repo)"

git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

替换homebrew-core.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

刷新源

brew update

安装nvm

nvm官网说了不要使用brew安装,因此按照官网的方式安装
https://github.com/nvm-sh/nvm
参考 http://nvm.uihtm.com/

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

安装完了执行

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

安装node 指定node默认环境

安装node
nvm install

指定默认node
nvm use 14.15.3
nvm alias default 14.15.3

安装cnpm
npm install cnpm -g

安装oh my zsh

gitee安装

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

安装code .

code . 不能快速打开当前路径的控制面板。

打开vscode 快捷键shift+command+p 后输入shell
选择 Install ‘code’ command in PATH

标签:安装,code,oh,com,sh,git,homebrew,nvm,zsh
来源: https://www.cnblogs.com/ltfxy/p/15805758.html

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有