Files
Arkie-Library-Frontend/docs/workflow.md

85 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2026-05-16 18:14:55 +08:00
# Development Workflow
This repo is intentionally simple: make changes, validate locally, then push only when ready.
## Start a session
```bash
git status --short --branch
git fetch origin main
```
If working on staging:
```bash
git switch terry-staging
git pull --ff-only
```
If working directly on production deploy branch:
```bash
git switch main
git pull --ff-only origin main
```
## Make changes
Use the existing structure:
2026-05-20 11:33:43 +08:00
- Public pages: `src/pages/<PageName>/index.tsx`
- Admin pages: `src/pages/admin/<PageName>/index.tsx`
2026-05-16 18:14:55 +08:00
- Shared components: `src/components/`
- API helpers/types: `src/api.ts`
- Translations/copy: `src/i18n.tsx`
- Display helpers: `src/utils/`
Avoid editing generated `dist/` files.
## Validate
Run:
```bash
npx tsc --noEmit
npm run format:check
2026-05-16 18:21:37 +08:00
npm test
2026-05-16 18:14:55 +08:00
npm run build
```
For formatting fixes:
```bash
npm run format
```
## Commit
Check the diff first:
```bash
git diff
git status --short
```
Use concise commits, for example:
```bash
git add <files>
git commit -m "fix: remove unused imports"
```
## Push
Only push when Terry asks.
```bash
git push origin main
```
or for staging:
```bash
git push origin terry-staging
```