smartinio / aoc

Advent of Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent of Code

My solutions and dev setup for AoC in vanilla NodeJS.

I'll probably not attempt all problems.

The solutions need to run via yarn code due to the following global patches:

Global patches

See scripts/globals.js for more info

  • require is patched to support importing .txt files
  • log pretty prints data structures in full
  • range works like in python

Setup

yarn

Scaffold new solution

Year and date defaults to today.

yarn new [-y, --year <n>] [-d, --day <n>]
# e.g. yarn new -y 2022 -d 4

For help:

yarn new --help

Run code

Year and date defaults to today. Part defaults to 1. Can watch for changes.

yarn code [-w, --watch] [-y, --year <n>] [-d, --day <n>] [-p, --part <n>]
# e.g. yarn code --watch -y 2022 -d 1 -p 1

For help:

yarn code --help

About

Advent of Code


Languages

Language:JavaScript 100.0%