amorriscode / advent-of-code

πŸŽ… Advent of Code template and generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo is used to help maintain my JavaScript solutions for Advent of Code.

Setup

  1. Generate a repo from this template

  2. Install dependencies

    yarn
  3. Bask in the holiday cheer πŸŽ…

Generate a new solution from a template

YEAR=20XX DAY=0X yarn new

Copy your inputs

Inside the /inputs directory, you'll see have an input.txt and example.txt for each day you are solving. The input.txt is your unique Advent of Code input. The example.txt is for the example input given in the text of the question.

Automatically downloading your input

If you want to have your input automatically downloaded from the Advent of Code API, simply add a .env file at the root of your project with your Advent of Code session ID. This is the cookie that is set on your browser when you log in to the website.

Run tests while you're solve the problem

YEAR=20XX DAY=0X yarn test --watch

Display the output for a solution

YEAR=20XX DAY=0X yarn solve

Sample output

About

πŸŽ… Advent of Code template and generator


Languages

Language:JavaScript 67.5%Language:Shell 32.5%