refactor: replace custom picker and build scripts with slidev-decks#13
refactor: replace custom picker and build scripts with slidev-decks#13afonsojramos wants to merge 7 commits intoantfu:mainfrom
Conversation
|
Another note: The per-deck With that change:
The trade-off is a one-time rename of all 37 folders + updating netlify.toml redirects. The date-based redirects (/2024-12-07 → /2024/feday/) would still work since redirects.ts can generate those from folder names. |
Summary
Replaces the custom
picker.tsandbuild.tsscripts withslidev-decks— a lean CLI for managing multiple Slidev presentations. This was actually inspired by this repo (mentioned in Prior Art), so it felt right to bring it full circle.What changes:
pnpm devnow usesslidev-decksinteractive picker (fuzzy matching, sorted by date, title display)pnpm buildusesslidev-decks build --all --continue-on-error(progress tracking, incremental builds)tsx ../../scripts/build.ts <base>toslidev build --out <dir> --base <base>execa,prompts,@types/prompts,tinyexecWhat stays the same:
scripts/redirects.ts(still parses base paths from per-deck build scripts — verified all 35 work)netlify.tomldeployment,dist-stalecaching strategyNet change: 40 lines added, 138 lines removed across 39 files (mostly simplified per-deck package.json build scripts).
What slidev-decks provides over the custom scripts
slides.mdin both flat (<name>/slides.md) and nested (<name>/src/slides.md) layouts--continue-on-errorfor resilient batch builds--filterfor building subsets (slidev-decks build --all -f "2024-*")[3/35]) during batch buildsslidev-decks listfor a quick overview of all decksTest plan
slidev-decks listdiscovers all 35 Slidev decks (2 pre-Slidev PDF-only talks correctly excluded)redirects.tsbase path extraction still works for all 35 decks (regex matches new build script format)pnpm devlaunches interactive picker and starts a deckpnpm buildbuilds all decks with correct base pathsNote: Obviously this is a PR which was opened against, what I would consider, a source-available repo that is not commonly open for PRs, so feel free to close if you want, no hurt feelings! 😁