共计 987 个字符,预计需要花费 3 分钟才能阅读完成。
windows 平台
nvm-windows
首先去 nvm-windows releases 页下载安装最新的 nvm-windows
,这样咱们就能够装置咱们须要的nodejs
了
配置终端
关上微软利用商店搜寻装置 Windows Terminal
和Prower Shell
, 而后用管理员模式执行 Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
:让操作系统能够执行powershell
脚本。
git
在 prowershell
中应用 winget
装置即可:winget install --id Git.Git
,而后配置:
# 配置名字和 email | |
git config --global user.name xxx | |
git config --global user.email xxx | |
# 配置记住明码 | |
git config --global credential.helper store | |
# 配置别名 | |
git config --global alias.a add | |
git config --global alias.br branch | |
git config --global alias.su status | |
git config --global alias.pl pull | |
git config --global alias.ps push | |
git config --global alias.co checkout |
starship
我自己比拟喜爱用 starship
来配置终端,同样应用 winget
来装置:winget install --id Starship.Starship
,而后 notepad $PROFILE
关上配置文件输出:
Invoke-Expression (& 'C:\Program Files\starship\bin\starship.exe' init powershell --print-full-init | Out-String)
重启终端即可。
激活 pnpm 并且换源
假如咱们曾经装置好 nvm-windows
并且装置了 nodejs(v16+)
了
# 开启 corepack | |
corepack enable | |
# 看下 pnpm 是否曾经可用,如果不可用再去执行 corepack prepare pnpm@latest --activate 激活 | |
pnpm -v | |
# 更换 taobao 源 | |
pnpm config set registry https://registry.npmmirror.com/ |
正文完