Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This is a **static marketing website** for RocketPy (rocketpy.org) - an open-sou

### Image Assets
- Background images are referenced in CSS using optimized assets (e.g., `url("../images/hero-background.png")`)
- Section illustrations use descriptive filenames (e.g., `hero-logo-illustration.png`, `community-visual.png`)
- Section illustrations are scalable SVGs with descriptive filenames (e.g., `hero-trajectory.svg`, `community-network.svg`)
- Favicon and logo files are in `images/` directory

## Development Workflow
Expand All @@ -36,6 +36,15 @@ npm run format # Runs Prettier on all HTML, CSS, JS files
```
Only dev dependency is Prettier (v3.3.3). Always format before committing.

### Local Preview
```bash
make start # serve the source files at http://127.0.0.1:8000 (override with PORT=)
make status # check whether the dev server is running
make stop # stop the dev server
make build # build the minified site into dist/
```
The `make` targets wrap `scripts/devserver.py`, a cross-platform (Windows/macOS/Linux) manager for a detached `python -m http.server`. Run `make help` to list all targets.

### Deployment
- **Automatic deployment** via GitHub Actions (`.github/workflows/static.yml`)
- Triggers on push to `master` branch
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ node_modules/
# Build output
dist/

# Local dev server
.devserver.pid

# OS files
.DS_Store
Thumbs.db
Expand Down
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# RocketPy site - local dev helpers.
# Run `make help` to list the available targets.

PORT ?= 8000
HOST ?= 127.0.0.1
export PORT HOST

.PHONY: help start stop restart status build serve-dist format

help:
@echo Targets:
@echo make start - start the local dev server on the source files
@echo make stop - stop the dev server
@echo make restart - restart the dev server
@echo make status - show whether the server is running
@echo make build - build the minified site into dist/
@echo make serve-dist - build then preview the production dist/ output
@echo make format - run prettier on html/css/js
@echo Override the port with e.g. make start PORT=3000

start:
@python scripts/devserver.py start

stop:
@python scripts/devserver.py stop

restart:
@python scripts/devserver.py restart

status:
@python scripts/devserver.py status

build:
@npm run build

serve-dist: build
@python scripts/devserver.py stop
@python -m http.server $(PORT) --directory dist --bind $(HOST)

format:
@npm run format
Loading