准备你的开发环境
Get ready to…
- 安装用于构建 Astro 网站的任何工具
获取你需要的开发工具
Section titled 获取你需要的开发工具¥Get the dev tools you need
¥Terminal
你将使用命令行(终端)创建 Astro 项目并运行关键命令来构建、开发和测试你的站点。
¥You will use a command line (terminal) to create your Astro project and to run key commands to build, develop, and test your site.
你可以通过操作系统的本地终端程序访问命令行。常见应用包括终端 (MacOS/Linux)、命令提示符 (Windows) 和 Termux (Android)。其中之一可能已经在你的计算机上。
¥You can access the command line through a local terminal program for your operating system. Common applications include Terminal (MacOS/Linux), Command Prompt (Windows), and Termux (Android). One of these will probably already be on your machine.
Node.js
Section titled Node.js要让 Astro 在你的系统上运行,你还需要安装 Node.js,版本 v18.17.1
或 v20.3.0
或更高版本。(不支持 v19
。)
¥For Astro to run on your system, you will also need to have Node.js installed, version v18.17.1
or v20.3.0
or later. (v19
is not supported.)
要检查你是否已安装兼容版本,请在终端中运行以下命令:
¥To check to see whether you already have a compatible version installed, run the following command in your terminal:
如果命令返回的版本号高于 v18.17.1
或 v20.3.0
(不包括任何 v19
),你就可以开始了!
¥If the command returns a version number higher than v18.17.1
or v20.3.0
(excluding any v19
), you’re good to go!
如果命令返回错误消息(如 Command 'node' not found
)或版本号低于要求,则需要 安装兼容的 Node.js 版本。
¥If the command returns an error message like Command 'node' not found
, or a version number lower than the required, then you need to install a compatible Node.js version.
代码编辑器
Section titled 代码编辑器¥Code Editor
此外,你需要下载并安装代码编辑器来编写代码。
¥Additionally, you will need to download and install a code editor to write your code.
- Download and install VS Code or another code editor of your choice.
测试你的知识
Section titled 测试你的知识¥Test your knowledge
以下哪一项是…
¥Which of the following is…
- 代码编辑器,用于更改文件及其内容?
- 你的存储库的在线版本控制提供商?
- 用于运行命令的应用?
继续前进的清单
Section titled 继续前进的清单¥Checklist for moving on
¥Resources
-
FreeCodeCamp.org external — a free educational site with full courses or quick refreshers in HTML, CSS, JS, and more.