🚀 文档
快速开始
快速开始使用本知识库,了解基本概念和使用方法
环境配置
上一章已经跑通了项目,这一章来把开发环境配置得更顺手。
Node.js
如果还没有安装 Node.js,参考以下步骤:
macOS
brew install node@20
node -v # 验证
Windows
去 Node.js 官网 下载 LTS 版本,一路下一步就行。
Linux
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
Git
# 配置你的身份
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
# 生成 SSH 密钥(如果还没配过的话)
ssh-keygen -t ed25519 -C "your.email@example.com"
编辑器
这个看个人习惯:
- VS Code:免费、轻量、插件多,最多人用
- WebStorm:功能全面,开箱即用,但要付费
- Neovim:适合喜欢折腾配置的朋友
选好编辑器后,建议装上 ESLint 和 Prettier 插件,代码风格会统一很多。