- Bun & TypeScript
- Automatic day setup
- Puzzle input automatically fetched
- Performance metrics
This template is strongly inspired by the template from matijaoe.
Thanks for your inspiration!
Ensure bun
is installed:
bun -v
if not installed, run this:
curl -fsSL https://bun.sh/install | bash
Install dependencies:
bun install
Set up a new day:
bun setup 1
Run day solutions:
bun day 1
For automatic puzzle input retrieval, define .env
file with session
cookie from adventofcode.com:
SESSION=
YEAR=2023
Generated day structure:
import { parseLines, readInput } from 'io';
const input = await readInput('day-01');
export const part1 = () => {
const lines = parseLines(input);
// TODO: add your code goes here
return lines.length;
};
bun day <day-num>
output:
🕯️ Your result for day <DAY>:
🌲 Part One: 70698 (1.11 ms)
🎄 Part Two: 140471 (383.5 µs)
⭐ / ❌
Day | Part 1 | Part 2 | Solution | Advent of Code link |
---|---|---|---|---|
01 | ⭐ | ⭐ | Link | Day 01 |
02 | ⭐ | ⭐ | Link | Day 02 |
03 | ⭐ | ⭐ | Link | Day 03 |
04 | ⭐ | ⭐ | Link | Day 04 |
05 | ⭐ | ⭐ | Link | Day 05 |
06 | ⭐ | ⭐ | Link | Day 06 |
07 | ⭐ | ⭐ | Link | Day 07 |
08 | ⭐ | ⭐ | Link | Day 08 |
09 | ⭐ | ⭐ | Link | Day 09 |
10 | ⭐ | ⭐ | Link | Day 10 |
11 | ⭐ | ⭐ | Link | Day 11 |
12 | ⭐ | ⭐ | Link | Day 12 |
13 | ⭐ | ⭐ | Link | Day 13 |
14 | ⭐ | ⭐ | Link | Day 14 |
15 | ⭐ | ⭐ | Link | Day 15 |
16 | ⭐ | ⭐ | Link | Day 16 |
17 | ⭐ | ⭐ | Link | Day 17 |
18 | ⭐ | ⭐ | Link | Day 18 |
19 | ⭐ | ⭐ | Link | Day 19 |
20 | ⭐ | ⭐ | Link | Day 20 |
21 | ⭐ | ⭐ | Link | Day 21 |
22 | ⭐ | ⭐ | Link | Day 22 |
23 | ⭐ | ⭐ | Link | Day 23 |
24 | ⭐ | ❌ | Link | Day 24 |
25 | ⭐ | ❌ | Link | Day 25 |