Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amorriscode/advent-of-code
🎅 Advent of Code template and generator
https://github.com/amorriscode/advent-of-code
advent-of-code christmas generator santa template
Last synced: 3 months ago
JSON representation
🎅 Advent of Code template and generator
- Host: GitHub
- URL: https://github.com/amorriscode/advent-of-code
- Owner: amorriscode
- Created: 2019-12-02T03:49:37.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T18:02:31.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T18:13:05.160Z (5 months ago)
- Topics: advent-of-code, christmas, generator, santa, template
- Language: JavaScript
- Homepage:
- Size: 1.35 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-advent-of-code - amorriscode/advent-of-code
README
# [Advent of Code](https://adventofcode.com/) 🎄
This repo is used to help maintain my [JavaScript solutions](https://github.com/amorriscode/advent-of-code-solutions) for Advent of Code.
## Setup
1. [Generate a repo from this template](https://github.com/amorriscode/advent-of-code/generate)
2. Install dependencies
```bash
yarn
```3. Bask in the holiday cheer 🎅
## Generate a new solution from a template
```bash
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
```bash
YEAR=20XX DAY=0X yarn test --watch
```## Display the output for a solution
```bash
YEAR=20XX DAY=0X yarn solve
```![Sample output](https://user-images.githubusercontent.com/16005567/100702881-566baa80-3357-11eb-9500-dfab877c824f.png)