Advent of Code 2024 solved with typescript using the bun runtime.
To install dependencies:
bun installTo run:
bun run day "<day_number_>"Test data goes in testdata/<day_number>.txt.
Real data goes in testdata/<day_number>.txt.
To fetch input from website, put your session cookie in .env:
AOC_SESSION="<session_key>"Make sure to not include "session=" in the key
You can then use this to load input data:
bun run load "<day_number>"To generate a new solution file, run
bun run new "<day_number>"To change the template, edit solutions/0.ts