-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitignore
More file actions
92 lines (82 loc) · 4.64 KB
/
Copy path.gitignore
File metadata and controls
92 lines (82 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# 📂 ไฟล์: .gitignore
# ตำแหน่ง: mgg/.gitignore
# หน้าที่: กำหนดไฟล์และโฟลเดอร์ที่ไม่ต้องการให้ Git ติดตาม (ไม่ถูก Commit ขึ้น GitHub)
# เหตุผล: ลดขนาดโปรเจกต์, ป้องกันข้อมูลสำคัญรั่วไหล เช่น API Keys
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# อธิบาย:
# ให้ลิงก์อ้างอิงการใช้งาน .gitignore (เป็น Comment)
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
# อธิบาย:
# /node_modules: โฟลเดอร์เก็บ Dependency ขนาดใหญ่ (~100+ MB) ไม่ควร Push ขึ้น Git
# /.pnp และ .pnp.*: ไฟล์ของ Yarn Plug'n'Play (ไม่ใช้ npm)
# .yarn/*: ละเว้นโฟลเดอร์ของ Yarn ยกเว้นบางส่วน (! ใช้สำหรับ Allow)
# เหตุผล:
# ป้องกันการ Upload ข้อมูลซ้ำซ้อนและใหญ่เกินไป
# ใช้ npm install โหลดใหม่ได้จาก package.json
# testing
/coverage
# อธิบาย:
# /coverage: ผลการทดสอบ (เช่น Jest) ไม่จำเป็นต้อง Push
# เหตุผล:
# ไฟล์ชั่วคราวจากการทดสอบ ไม่ใช่ส่วนหนึ่งของโค้ดจริง
# next.js
/.next/
/out/
# อธิบาย:
# /.next: ไฟล์ที่ถูก Build โดย Next.js (เช่น HTML, CSS, JS ที่ Compile แล้ว)
# /out: ไฟล์ที่ได้จาก next export (กรณีทำ Static Site)
# เหตุผล:
# ลดขนาดโปรเจกต์ และไม่จำเป็นต้องติดตามเพราะสามารถสร้างใหม่ได้ด้วย npm run build
# production
/build
# อธิบาย:
# /build: ผลลัพธ์จากการ Build (ถ้าใช้ Custom Build)
# เหตุผล:
# ไม่ต้องติดตามไฟล์ที่ Build แล้ว เพราะ Build ใหม่ได้ตลอด
# misc
.DS_Store
*.pem
# อธิบาย:
# .DS_Store: ไฟล์ของ macOS สำหรับเก็บข้อมูลเมตา (ไม่จำเป็น)
# *.pem: ไฟล์ Certificate เช่น SSL, Key ที่อาจมีข้อมูลสำคัญ
# เหตุผล:
# ป้องกันข้อมูลรั่วไหลและลดไฟล์ขยะที่ไม่เกี่ยวข้องกับโปรเจกต์
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# อธิบาย:
# ละเว้นไฟล์ Log ที่สร้างขึ้นเมื่อเจอ Error ใน npm หรือ yarn
# เหตุผล:
# ไม่จำเป็นต้อง Push ขึ้น Git และมักเป็นไฟล์ชั่วคราว
# env files (can opt-in for committing if needed)
.env*
# อธิบาย:
# .env*: ละเว้นไฟล์ Environment ทั้งหมด เช่น .env.local
# สำคัญ: ป้องกันไม่ให้ API Key หรือ Config ของ Firebase รั่วไหล
# เหตุผล:
# ไฟล์ .env.local มีข้อมูลลับ เช่น API_KEY ของ Firebase
# อนาคต: ต้องเก็บไฟล์นี้ให้ปลอดภัย โดยไม่ Push ขึ้น GitHub
# vercel
.vercel
# อธิบาย:
# .vercel: โฟลเดอร์ Config ของ Vercel สำหรับ Deploy
# เหตุผล:
# ไม่จำเป็นต้อง Push ขึ้น Git เพราะสร้างใหม่ได้ตอน Deploy
# typescript
*.tsbuildinfo
next-env.d.ts
# อธิบาย:
# *.tsbuildinfo: ไฟล์ Cache ของ TypeScript (ไม่ต้องติดตาม)
# next-env.d.ts: สร้างโดย Next.js เมื่อใช้ TypeScript
# เหตุผล:
# ป้องกันการติดตามไฟล์ชั่วคราวที่สร้างใหม่ได้ตลอด