UNPKG

rerumaccusamus

Version:

The meta-framework suite designed from scratch for frontend-focused modern web development.

26 lines (15 loc) 1.08 kB
--- title: 环境准备 --- 从本章节开始,我们将进入实战教程部分。 在实战教程中,我们将会从环境准备开始,从简单到复杂,一步一步搭建一个真实的项目。 基于 Modern.js 框架的项目,自带全套工程环境和工程能力,是 **自包含**(self-contained)的,对仓库目录之外的环境几乎没有任何依赖,只需要安装以下少数几个最基本的工具。 ## 1. Node.js 需要 [Node.js LTS](https://github.com/nodejs/Release),并确保 Node 版本大于等于 14.17.6 Modern.js 推荐在开发环境里先安装 [nvm](https://github.com/nvm-sh/nvm#install--update-script),在 shell 里集成[自动切换 node 版本的脚本](https://github.com/nvm-sh/nvm#deeper-shell-integration)。 然后只要仓库根目录下有内容为 `lts/fermium` `lts/erbium` `.nvmrc` 文件,进入这个仓库时就会自动安装或切换到正确的 Node.js 版本。 ## 2. pnpm 推荐使用 [pnpm](https://pnpm.io/installation) 来管理项目依赖: ```bash npm install -g pnpm ```