Awesome
Advent-of-Code
Advent of Code... In JavaScript!
My own solutions for Advent of Code.
Initial Setup
Make sure to have Node.js and Git installed.
Clone the repository
git clone https://github.com/wizardassassin/Advent-of-Code.git
cd Advent-of-Code
Install the dependencies
npm i
Running Solutions
Running a single solution
The example runs the solution for day 1, year 2022.
node . debug 2022 1
Example output
{
"year": 2022,
"day": 1,
"output": { "partOne": 73211, "partTwo": 213958 },
"duration": "0.3455ms"
}
Running all solutions
node . run
The results are aggregated into a json file. The duration is in milliseconds.
Creating/Deleting a Day
Creates the template files for day 1, year 2023.
node . create 2023 1
Deletes the template files for day 1, year 2023.
node . delete 2023 1