https://github.com/passidel/aoc
Advent of Code 2024
https://github.com/passidel/aoc
advent-of-code advent-of-code-2024 aoc bun test typescript
Last synced: 4 months ago
JSON representation
Advent of Code 2024
- Host: GitHub
- URL: https://github.com/passidel/aoc
- Owner: PassiDel
- License: other
- Created: 2024-12-02T12:36:34.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-12-25T10:42:10.000Z (7 months ago)
- Last Synced: 2025-03-25T07:13:59.924Z (4 months ago)
- Topics: advent-of-code, advent-of-code-2024, aoc, bun, test, typescript
- Language: TypeScript
- Homepage: https://adventofcode.com/
- Size: 139 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code


![Runtime Bun]()> [LANGUAGE: TypeScript]
>
> [RUNTIME: Bun]## Structure
Every solution is grouped by its year and day and (usually) consists of five files:
| Filename | Purpose |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `//index.ts` | Has the solution. Exports two functions: `solveFirst(string): number` and `solveSecond(string): number` |
| `//index.test.ts` | Unit test using the example input and expected solution. |
| `//run.ts` | Basic run script: Loading the actual input and passing it into the two solve functions. |
| `//input.txt` | Input text from AOC. |
| `//-.run.xml` | IntelliJ/Webstorm runfile for `run.ts` using Bun. |## Setup
To install dependencies:
```bash
bun install
```To test all days:
```bash
bun run test
```To create a new day-folder:
```bash
bun run copy.ts
```To run a single day, first copy your input file from `https://adventofcode.com//day//input` into
`//input.txt`. Then run:```bash
bun run //run.ts
```