Skip to content
/ aoc-2024 Public template

πŸŽ…πŸΌ πŸ¦– Advent of Code 2024, solved using Deno and TypeScript.

Notifications You must be signed in to change notification settings

magnusrodseth/aoc-2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ…πŸ½πŸ¦– Advent of Code 2024, solved using Deno and TypeScript

A powerful and flexible setup for solving Advent of Code puzzles with Deno. This toolkit helps you scaffold, download, and solve puzzles with ease. 🧩

πŸš€ Features

  • Automatic Scaffolding: Generate boilerplate code for new days. πŸ› οΈ
  • Puzzle Download: Fetch inputs and puzzles directly from Advent of Code with the aoc CLI. πŸ“¦
  • Task Runner: Manage development tasks using Deno's task feature. βœ…
  • TypeScript Support: Write clean, type-safe solutions. πŸ“œ

πŸ“¦ Setup

  1. Install Deno.
  2. Install the aoc CLI tool (documentation).
  3. Create a session cookie file at ~/.adventofcode.session for fetching inputs.

πŸ› οΈ Tasks

This project uses deno task to simplify common workflows:

  • scaffold <day>: Create boilerplate files for a given day.
  • download <day>: Download input and puzzle files for a specific day.
  • solve <day>: Run the solution for a specific day.

Example Commands

# Scaffold a new day
deno task scaffold 1

# Download inputs for day 1
deno task download 1

# Solve puzzles for day 1
deno task solve 1

# Run tests on example data for day 1
deno task test 1

πŸ“‚ Folder Structure

β”œβ”€β”€ days/                  # Solutions for each day
β”‚   β”œβ”€β”€ day01.ts           # Day 1 solution
β”‚   β”œβ”€β”€ day02.ts           # Day 2 solution
β”‚   └── ...
β”œβ”€β”€ data/                  # Input and example data
β”‚   β”œβ”€β”€ inputs/            # Puzzle inputs
β”‚   β”œβ”€β”€ examples/          # Example inputs
β”‚   └── puzzles/           # Puzzle descriptions
β”œβ”€β”€ scripts/               # Helper scripts
β”‚   β”œβ”€β”€ scaffold.ts        # Scaffolding script
β”‚   β”œβ”€β”€ download.ts        # Download script
β”‚   β”œβ”€β”€ solve.ts           # Solve script
β”‚   └── _template.ts       # Template for scaffolding
└── deno.json              # Deno configuration

🌟 How It Works

  • Use scaffold to create a solution template for a specific day.
  • Use download to fetch inputs and puzzles.
  • Write and test your solutions in the generated files.
  • Use solve to run and verify your answers.
  • Use test to run tests on example data for a specific day.

πŸ‘‹πŸ½ Developer Information

Made with ❀️ by @magnusrodseth

About

πŸŽ…πŸΌ πŸ¦– Advent of Code 2024, solved using Deno and TypeScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published