72 lines
1.3 KiB
Markdown
72 lines
1.3 KiB
Markdown
|
|
# CyberCloud
|
|||
|
|
|
|||
|
|
<p align="center">
|
|||
|
|
<img src="public/images/logo-text.png" width="300" alt="CyberCloud Logo" />
|
|||
|
|
</p>
|
|||
|
|
|
|||
|
|
这是 CyberCloud 的官方网站,一个使用 [Next.js](https://nextjs.org/)、[TailwindCSS](https://tailwindcss.com/) 和 [TypeScript](https://www.typescriptlang.org/) 构建的项目。
|
|||
|
|
|
|||
|
|
## 入门指南
|
|||
|
|
|
|||
|
|
首先,安装依赖项:
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
npm install
|
|||
|
|
# or
|
|||
|
|
yarn install
|
|||
|
|
# or
|
|||
|
|
pnpm install
|
|||
|
|
# or
|
|||
|
|
bun install
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
然后,运行开发服务器:
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
npm run dev
|
|||
|
|
# or
|
|||
|
|
yarn dev
|
|||
|
|
# or
|
|||
|
|
pnpm dev
|
|||
|
|
# or
|
|||
|
|
bun dev
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
在浏览器中打开 [http://localhost:3000](http://localhost:3000) 查看结果。
|
|||
|
|
|
|||
|
|
## 构建生产版本
|
|||
|
|
|
|||
|
|
项目支持两种生产构建模式:
|
|||
|
|
|
|||
|
|
### 1. Vercel 部署 (默认)
|
|||
|
|
|
|||
|
|
要为 Vercel 或其他支持 Next.js 的 Node.js 环境构建,请运行:
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
npm run build
|
|||
|
|
# or
|
|||
|
|
yarn build
|
|||
|
|
# or
|
|||
|
|
pnpm build
|
|||
|
|
# or
|
|||
|
|
bun build
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
此命令将生成一个优化过的应用程序,包括一个独立的服务器,位于 `build` 目录中。
|
|||
|
|
|
|||
|
|
### 2. 静态站点导出
|
|||
|
|
|
|||
|
|
要将网站导出为纯静态文件(HTML/CSS/JS),以便在任何静态主机上使用(例如 `npx serve`),请运行:
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
npm run export
|
|||
|
|
# or
|
|||
|
|
yarn export
|
|||
|
|
# or
|
|||
|
|
pnpm export
|
|||
|
|
# or
|
|||
|
|
bun export
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
此命令也会将输出文件生成在 `build` 目录中,但这些文件是完全静态的,可以直接提供服务。
|