/AdventOfCode2021

https://adventofcode.com/2021 in typescript

Primary LanguageTypeScriptMIT LicenseMIT

Advent of code Typescript Starter

A simple Advent of code starter project with Typescript and jest for testing.

How to use

Initial setup

  • npm install

For each day, where X is the day number (1-25):

  • ▶ run npm run setup X from your terminal
  • 🌐 Visit https://adventofcode.com/2021/day/X/input and copy the contents in your inputs/dayX/input.txt file
  • 🔴 Update the example input and result in the test case in your .spec.ts file
  • 🟢 Implement the necessary logic in solveForPart1
  • 💪 TDD all the things!
  • 🔁 Do the same for part 2
  • npm test to run your tests
  • npm run start X to run the day's test
  • Profit! 🎉

Credits

Some code was liberally taken from https://github.com/stemmlerjs/simple-typescript-starter after some serious head-desking