Spaces:
Sleeping
Sleeping
Upload 6 files
Browse files- Dockerfile +28 -0
- README.md +12 -10
- index.html +13 -0
- package.json +80 -0
- tsconfig.json +18 -0
- vite.config.ts +13 -0
Dockerfile
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 基礎映像:使用 Node 20 LTS
|
| 2 |
+
FROM node:20
|
| 3 |
+
|
| 4 |
+
# 設定工作目錄
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# 複製專案檔案
|
| 8 |
+
COPY package.json ./
|
| 9 |
+
COPY tsconfig.json ./
|
| 10 |
+
COPY vite.config.ts ./
|
| 11 |
+
COPY index.html ./
|
| 12 |
+
COPY public ./public
|
| 13 |
+
COPY src ./src
|
| 14 |
+
|
| 15 |
+
# 安裝依賴
|
| 16 |
+
RUN npm install
|
| 17 |
+
|
| 18 |
+
# 編譯專案
|
| 19 |
+
RUN npm run build
|
| 20 |
+
|
| 21 |
+
# 安裝輕量級靜態伺服器
|
| 22 |
+
RUN npm install -g serve
|
| 23 |
+
|
| 24 |
+
# HF Spaces 會自動把 7860 port 映射公開
|
| 25 |
+
EXPOSE 7860
|
| 26 |
+
|
| 27 |
+
# 啟動網站
|
| 28 |
+
CMD ["serve", "-s", "dist", "-l", "7860"]
|
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Roblox 教學網站 – Hugging Face Spaces Docker 版本
|
| 2 |
+
|
| 3 |
+
此專案為 [https://qbbjpwjv.manus.space/](https://qbbjpwjv.manus.space/) 的原始碼,
|
| 4 |
+
已調整為可以直接部署到 **Hugging Face Spaces (Docker 模式)**。
|
| 5 |
+
|
| 6 |
+
## 使用方式
|
| 7 |
+
|
| 8 |
+
1. 在 Hugging Face 新增一個 Space,選擇 **SDK: Docker**。
|
| 9 |
+
2. 上傳此壓縮檔並解壓(平台會自動展開)。
|
| 10 |
+
3. 無需修改 `Space Settings`,HF 會偵測 `Dockerfile`,並自動在 **port 7860** 啟動服務。
|
| 11 |
+
|
| 12 |
+
> 生成時間:2025-06-20T07:40:54Z
|
index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>roblox-tutorial</title>
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div id="root"></div>
|
| 11 |
+
<script type="module" src="/src/main.tsx"></script>
|
| 12 |
+
</body>
|
| 13 |
+
</html>
|
package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "react_repo",
|
| 3 |
+
"private": true,
|
| 4 |
+
"version": "0.0.0",
|
| 5 |
+
"type": "module",
|
| 6 |
+
"scripts": {
|
| 7 |
+
"dev": "vite",
|
| 8 |
+
"build": "tsc -b && vite build",
|
| 9 |
+
"lint": "eslint .",
|
| 10 |
+
"preview": "vite preview"
|
| 11 |
+
},
|
| 12 |
+
"dependencies": {
|
| 13 |
+
"@hookform/resolvers": "^3.10.0",
|
| 14 |
+
"@radix-ui/react-accordion": "^1.2.2",
|
| 15 |
+
"@radix-ui/react-alert-dialog": "^1.1.4",
|
| 16 |
+
"@radix-ui/react-aspect-ratio": "^1.1.1",
|
| 17 |
+
"@radix-ui/react-avatar": "^1.1.2",
|
| 18 |
+
"@radix-ui/react-checkbox": "^1.1.3",
|
| 19 |
+
"@radix-ui/react-collapsible": "^1.1.2",
|
| 20 |
+
"@radix-ui/react-context-menu": "^2.2.4",
|
| 21 |
+
"@radix-ui/react-dialog": "^1.1.4",
|
| 22 |
+
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
| 23 |
+
"@radix-ui/react-hover-card": "^1.1.4",
|
| 24 |
+
"@radix-ui/react-label": "^2.1.1",
|
| 25 |
+
"@radix-ui/react-menubar": "^1.1.4",
|
| 26 |
+
"@radix-ui/react-navigation-menu": "^1.2.3",
|
| 27 |
+
"@radix-ui/react-popover": "^1.1.4",
|
| 28 |
+
"@radix-ui/react-progress": "^1.1.1",
|
| 29 |
+
"@radix-ui/react-radio-group": "^1.2.2",
|
| 30 |
+
"@radix-ui/react-scroll-area": "^1.2.2",
|
| 31 |
+
"@radix-ui/react-select": "^2.1.4",
|
| 32 |
+
"@radix-ui/react-separator": "^1.1.1",
|
| 33 |
+
"@radix-ui/react-slider": "^1.2.2",
|
| 34 |
+
"@radix-ui/react-slot": "^1.1.1",
|
| 35 |
+
"@radix-ui/react-switch": "^1.1.2",
|
| 36 |
+
"@radix-ui/react-tabs": "^1.1.2",
|
| 37 |
+
"@radix-ui/react-toast": "^1.2.4",
|
| 38 |
+
"@radix-ui/react-toggle": "^1.1.1",
|
| 39 |
+
"@radix-ui/react-toggle-group": "^1.1.1",
|
| 40 |
+
"@radix-ui/react-tooltip": "^1.1.6",
|
| 41 |
+
"class-variance-authority": "^0.7.1",
|
| 42 |
+
"clsx": "^2.1.1",
|
| 43 |
+
"cmdk": "1.0.0",
|
| 44 |
+
"date-fns": "^4.1.0",
|
| 45 |
+
"embla-carousel-react": "^8.5.2",
|
| 46 |
+
"framer-motion": "^12.15.0",
|
| 47 |
+
"input-otp": "^1.4.2",
|
| 48 |
+
"lucide-react": "^0.364.0",
|
| 49 |
+
"next-themes": "^0.4.4",
|
| 50 |
+
"react": "^18.3.1",
|
| 51 |
+
"react-day-picker": "8.10.1",
|
| 52 |
+
"react-dom": "^18.3.1",
|
| 53 |
+
"react-hook-form": "^7.54.2",
|
| 54 |
+
"react-resizable-panels": "^2.1.7",
|
| 55 |
+
"react-router-dom": "^7.6.1",
|
| 56 |
+
"recharts": "^2.12.4",
|
| 57 |
+
"sonner": "^1.7.2",
|
| 58 |
+
"tailwind-merge": "^2.6.0",
|
| 59 |
+
"tailwindcss-animate": "^1.0.7",
|
| 60 |
+
"vaul": "^1.1.2",
|
| 61 |
+
"zod": "^3.24.1"
|
| 62 |
+
},
|
| 63 |
+
"devDependencies": {
|
| 64 |
+
"@eslint/js": "^9.15.0",
|
| 65 |
+
"@types/node": "^22.10.7",
|
| 66 |
+
"@types/react": "^18.3.12",
|
| 67 |
+
"@types/react-dom": "^18.3.1",
|
| 68 |
+
"@vitejs/plugin-react": "^4.3.4",
|
| 69 |
+
"autoprefixer": "10.4.20",
|
| 70 |
+
"eslint": "^9.15.0",
|
| 71 |
+
"eslint-plugin-react-hooks": "^5.0.0",
|
| 72 |
+
"eslint-plugin-react-refresh": "^0.4.14",
|
| 73 |
+
"globals": "^15.12.0",
|
| 74 |
+
"postcss": "8.4.49",
|
| 75 |
+
"tailwindcss": "v3.4.16",
|
| 76 |
+
"typescript": "~5.6.2",
|
| 77 |
+
"typescript-eslint": "^8.15.0",
|
| 78 |
+
"vite": "^6.0.1"
|
| 79 |
+
}
|
| 80 |
+
}
|
tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"files": [],
|
| 3 |
+
"references": [
|
| 4 |
+
{
|
| 5 |
+
"path": "./tsconfig.app.json"
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
"path": "./tsconfig.node.json"
|
| 9 |
+
}
|
| 10 |
+
],
|
| 11 |
+
"compilerOptions": {
|
| 12 |
+
"baseUrl": ".",
|
| 13 |
+
"paths": {
|
| 14 |
+
"@/*": ["./src/*"]
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
|
vite.config.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import path from "path"
|
| 2 |
+
import react from "@vitejs/plugin-react"
|
| 3 |
+
import { defineConfig } from "vite"
|
| 4 |
+
|
| 5 |
+
export default defineConfig({
|
| 6 |
+
plugins: [react()],
|
| 7 |
+
resolve: {
|
| 8 |
+
alias: {
|
| 9 |
+
"@": path.resolve(__dirname, "./src"),
|
| 10 |
+
},
|
| 11 |
+
},
|
| 12 |
+
})
|
| 13 |
+
|