Nếu chưa cài pnpm
:
npm i -g pnpm
Chạy development server
pnpm i
pnpm dev
husky
: các hook của git.next
: các file build của nextjspublic
: các file tĩnh (css, js, ảnh, ...)src
: source codeapp
: các route của ứng dụngcomponents
: các component dùng chunglib
: các hàm dùng chung
- Các file config khác (...)
- Các file
.tsx
đặt trong thư mụcsrc
sẽ được tự động format & kiểm tra lỗi khi commit
Commit message phải tuân theo cấu trúc sau:
<type>(<scope>): <short summary>
Type
là một trong các loại sau:
Commit Type | Title | Description | Emoji |
---|---|---|---|
feat |
Features | A new feature | ✨ |
fix |
Bug Fixes | A bug Fix | 🐛 |
docs |
Documentation | Documentation only changes | 📚 |
style |
Styles | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | 💎 |
refactor |
Code Refactoring | A code change that neither fixes a bug nor adds a feature | 📦 |
perf |
Performance Improvements | A code change that improves performance | 🚀 |
test |
Tests | Adding missing tests or correcting existing tests | 🚨 |
build |
Builds | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) | 🛠 |
ci |
Continuous Integrations | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) | ⚙️ |
chore |
Chores | Other changes that don't modify src or test files | ♻️ |
revert |
Reverts | Reverts a previous commit | 🗑 |
Scopes
(không bắt buộc):
app
: các thay đổi liên quan đến ứng dụnglib
: các thay đổi liên quan đến thư việnconfig
: các thay đổi liên quan đến cấu hình- (...)
Short summary
: sử dụng tiếng Anh hoặc tiếng Việt, tối đa 100 ký tự.
- Không viết in hoa.
- Không dùng dấu chấm cuối câu.
Chi tiết: conventional commits, commit types, example
Mẫu:
feat(app): add login page
sudo docker build -t uet/magicpost .
sudo docker run -p 3000:3000 uet/magicpost