Skip to content

echocrow/advent-of-code

Repository files navigation

Advent of Code Challenges

Contains personal solutions1 to the Advent of Code puzzles.

Setup

# Install dependencies.
pnpm install

# Scaffold universal input & output files.
pnpm init

Usage TL;DR

# 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

Usage

Execution

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

Miscellaneous Scripts

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

  1. includes, but is not limited to, actual solutions, inefficient approaches, efficient hacks, botched algorithms, and SoLuTiOnS.

About

Personal solutions to Advent of Code challenges

Resources

Stars

Watchers

Forks