Contains personal solutions1 to the Advent of Code puzzles.
# Install dependencies.
pnpm install
# Scaffold universal input & output files.
pnpm init
# Scaffold next day.
pnpm gen
# Run & watch changed tests…
pnpm test
# Run & watch latest part 1…
PART=1 pnpm watch:latest
# Run & watch latest part 2…
PART=2 pnpm watch:latest
Run a file with standard streams (stdin & stdout) instead of universal input/output files:
pnpm start ./scr/events/2023/25/1.ts
Run a file once:
FILE=src/events/2023/25/1.ts pnpm start:file
Run and watch a file:
FILE=src/events/2023/25/1.ts pnpm watch
Run and watch a part of the latest day:
PART=1 pnpm watch:latest
Scaffold code for the next day:
pnpm gen
Run all tests:
pnpm test:all --bail 1
Run and watch tests of modified/uncommitted changes:
pnpm test
Format files:
pnpm format
Footnotes
-
includes, but is not limited to, actual solutions, inefficient approaches, efficient hacks, botched algorithms, and SoLuTiOnS. ↩