关于前端:记录下前端工程师在windows平台的一些简单初始配置

windows平台

nvm-windows

首先去nvm-windows releases页下载安装最新的nvm-windows,这样咱们就能够装置咱们须要的nodejs

配置终端

关上微软利用商店搜寻装置Windows TerminalPrower 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/

【腾讯云】轻量 2核2G4M,首年65元

阿里云限时活动-云数据库 RDS MySQL  1核2G配置 1.88/月 速抢

本文由乐趣区整理发布,转载请注明出处,谢谢。

您可能还喜欢...

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据