Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magnusrodseth/aoc-2024
🎅🏼 🦖 Advent of Code 2024, solved using Deno and TypeScript.
https://github.com/magnusrodseth/aoc-2024
advent-of-code aoc aoc-2024-in-deno deno typescript
Last synced: about 2 months ago
JSON representation
🎅🏼 🦖 Advent of Code 2024, solved using Deno and TypeScript.
- Host: GitHub
- URL: https://github.com/magnusrodseth/aoc-2024
- Owner: magnusrodseth
- Created: 2024-11-28T09:06:24.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-28T10:20:01.000Z (about 2 months ago)
- Last Synced: 2024-11-28T10:24:42.215Z (about 2 months ago)
- Topics: advent-of-code, aoc, aoc-2024-in-deno, deno, typescript
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎅🏽🦖 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](https://deno.land/).
2. Install the `aoc` CLI tool ([documentation](https://github.com/scarvalhojr/aoc-cli)).
3. Create a session cookie file at `~/.adventofcode.session` for fetching inputs.## 🛠️ Tasks
This project uses `deno task` to simplify common workflows:
- `scaffold `: Create boilerplate files for a given day.
- `download `: Download input and puzzle files for a specific day.
- `solve `: Run the solution for a specific day.### Example Commands
```bash
# 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 for day 1
deno task test days/day01.ts
```## 📂 Folder Structure
```bash
├── 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](https://github.com/magnusrodseth)