Skip to content

Commit bdebf09

Browse files
authored
Merge pull request #74 from GRACENOBLE/move-scripts-to-scripts-dir
chore: move setup/dev scripts into scripts/ directory
2 parents 7670934 + fe73bfc commit bdebf09

7 files changed

Lines changed: 28 additions & 27 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,20 @@ Run the setup script once after cloning. It checks prerequisites, installs depen
105105

106106
```bash
107107
# macOS / Linux
108-
./setup.sh
108+
./scripts/setup.sh
109109

110110
# Windows
111-
./setup.ps1
111+
./scripts/setup.ps1
112112
```
113113

114114
### Starting all services
115115

116116
```bash
117117
# macOS / Linux — starts Postgres, backend, and web in one terminal
118-
./dev.sh
118+
./scripts/dev.sh
119119

120120
# Windows — opens three separate PowerShell windows
121-
./dev.ps1
121+
./scripts/dev.ps1
122122
```
123123

124124
Or start services individually:

‎Makefile‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99

1010
setup:
1111
ifeq ($(OS),Windows_NT)
12-
powershell -ExecutionPolicy Bypass -File setup.ps1
12+
powershell -ExecutionPolicy Bypass -File scripts/setup.ps1
1313
else
14-
bash setup.sh
14+
bash scripts/setup.sh
1515
endif
1616

1717
# ── Development ────────────────────────────────────────────────────────────────
1818

1919
dev:
2020
ifeq ($(OS),Windows_NT)
21-
powershell -ExecutionPolicy Bypass -File dev.ps1
21+
powershell -ExecutionPolicy Bypass -File scripts/dev.ps1
2222
else
23-
bash dev.sh
23+
bash scripts/dev.sh
2424
endif
2525

2626
dev-backend:

‎README.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ git clone https://github.com/your-username/fullstack-template.git
6868
cd fullstack-template
6969

7070
# First-time setup: installs deps, copies .env.example files, checks prerequisites
71-
./setup.sh # macOS / Linux
72-
.\setup.ps1 # Windows PowerShell
71+
./scripts/setup.sh # macOS / Linux
72+
.\scripts\setup.ps1 # Windows PowerShell
7373

7474
# Start all three services (backend + web + mobile hot-reload) in parallel
75-
./dev.sh # macOS / Linux
76-
.\dev.ps1 # Windows PowerShell
75+
./scripts/dev.sh # macOS / Linux
76+
.\scripts\dev.ps1 # Windows PowerShell
7777
```
7878

7979
### Manual setup
@@ -114,8 +114,9 @@ fullstack-template/
114114
├── TEMPLATE_STATUS.md # Readiness gap tracker
115115
├── docs/
116116
│ └── adr/ # Architecture Decision Records
117-
├── dev.sh / dev.ps1 # Start all services in parallel
118-
├── setup.sh / setup.ps1 # First-run contributor setup
117+
├── scripts/
118+
│ ├── dev.sh / dev.ps1 # Start all services in parallel
119+
│ └── setup.sh / setup.ps1 # First-run contributor setup
119120
├── renovate.json # Automated dependency updates
120121
├── .claude/
121122
│ ├── agents/ # Specialized Claude subagents

dev.ps1 renamed to scripts/dev.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# dev.ps1 — start all services in separate PowerShell windows (Windows equivalent of dev.sh)
2-
# Usage: .\dev.ps1
1+
# dev.ps1 — start all services in separate PowerShell windows (Windows equivalent of dev.sh)
2+
# Usage: .\scripts\dev.ps1
33
# Close each terminal window manually when done.
44

5-
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
5+
$ScriptDir = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Definition)
66

77
Write-Host "[postgres] Starting Docker Compose (Postgres)..." -ForegroundColor Blue
88
Start-Process powershell -ArgumentList "-NoExit", "-ExecutionPolicy", "Bypass", "-Command", "Set-Location '$ScriptDir\backend'; make docker-run" `

dev.sh renamed to scripts/dev.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# dev.sh — start all services in parallel in a single terminal
3-
# Usage: ./dev.sh
3+
# Usage: ./scripts/dev.sh
44
# Press Ctrl+C to stop everything.
55

66
set -euo pipefail
@@ -10,7 +10,7 @@ GREEN='\033[1;32m'
1010
YELLOW='\033[1;33m'
1111
RESET='\033[0m'
1212

13-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
1414

1515
# Kill all background jobs when the script exits (Ctrl+C or error)
1616
trap 'echo ""; echo "Stopping all services..."; kill $(jobs -p) 2>/dev/null; wait' EXIT

setup.ps1 renamed to scripts/setup.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# setup.ps1 -- first-run setup for new contributors (Windows / PowerShell)
2-
# Usage: .\setup.ps1
2+
# Usage: .\scripts\setup.ps1
33
# Run once after cloning the repo.
44

55
$ErrorActionPreference = "Continue"
6-
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
6+
$ScriptDir = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Definition)
77
$Errors = 0
88

99
# Banner
@@ -113,7 +113,7 @@ if (Test-Path $androidHome) {
113113
# Abort on failures
114114
if ($Errors -gt 0) {
115115
Write-Host ""
116-
Write-Host "$Errors prerequisite(s) failed. Fix the issues above and re-run .\setup.ps1." -ForegroundColor Red
116+
Write-Host "$Errors prerequisite(s) failed. Fix the issues above and re-run .\scripts\setup.ps1." -ForegroundColor Red
117117
Write-Host ""
118118
exit 1
119119
}
@@ -167,7 +167,7 @@ Write-Host " You're all set! Run these commands to start developing: " -Foreg
167167
Write-Host "============================================================" -ForegroundColor Green
168168
Write-Host ""
169169
Write-Host " Quickstart (all services in separate windows):" -ForegroundColor White
170-
Write-Host " .\dev.ps1" -ForegroundColor Yellow
170+
Write-Host " .\scripts\dev.ps1" -ForegroundColor Yellow
171171
Write-Host ""
172172
Write-Host " Or start each service individually:" -ForegroundColor White
173173
Write-Host " cd backend; make docker-run # Postgres" -ForegroundColor Blue

setup.sh renamed to scripts/setup.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# setup.sh — first-run setup for new contributors
3-
# Usage: ./setup.sh
3+
# Usage: ./scripts/setup.sh
44
# Run once after cloning the repo.
55

66
set -euo pipefail
@@ -12,7 +12,7 @@ RED='\033[0;31m'
1212
BOLD='\033[1m'
1313
RESET='\033[0m'
1414

15-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
1616
ERRORS=0
1717

1818
# ── Banner ─────────────────────────────────────────────────────────────────────
@@ -101,7 +101,7 @@ fi
101101
# Abort if any hard prerequisite failed
102102
if [[ "$ERRORS" -gt 0 ]]; then
103103
echo ""
104-
echo -e "${RED}${BOLD}$ERRORS prerequisite(s) failed. Fix the issues above and re-run ./setup.sh.${RESET}"
104+
echo -e "${RED}${BOLD}$ERRORS prerequisite(s) failed. Fix the issues above and re-run ./scripts/setup.sh.${RESET}"
105105
echo ""
106106
exit 1
107107
fi
@@ -146,7 +146,7 @@ echo -e "${BOLD}${GREEN}║ You're all set! Run these commands to start develo
146146
echo -e "${BOLD}${GREEN}╚═══════════════════════════════════════════════════════════╝${RESET}"
147147
echo ""
148148
echo -e " ${BOLD}Quickstart (all services in one terminal):${RESET}"
149-
echo -e " ${YELLOW}./dev.sh${RESET}"
149+
echo -e " ${YELLOW}./scripts/dev.sh${RESET}"
150150
echo ""
151151
echo -e " ${BOLD}Or start each service individually:${RESET}"
152152
echo -e " ${BLUE}cd backend && make docker-run${RESET} # Postgres"

0 commit comments

Comments
 (0)