chapter02
进阶环境配置
这一章介绍一些进阶的开发环境配置,按需取用就行。
Node.js
如果之前没装过,先装上:
macOS
brew install node@20
node -v
Windows
去 Node.js 官网 下载 LTS 版本。
Linux
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
Git 进阶配置
# 配置编辑器
git config --global core.editor "code --wait"
# 配置差异工具
git config --global diff.tool vscode
git config --global difftool.vscode.cmd "code --wait --diff $LOCAL $REMOTE"
编辑器插件推荐
除了基础的 ESLint 和 Prettier,还可以考虑:
- Tailwind CSS IntelliSense:如果用 Tailwind 的话
- GitLens:看代码变更历史很方便
- Error Lens:错误提示直接显示在代码行旁边