https://github.com/jcwillox/advent-of-code
Multi-lang Advent of Code Cookiecutter and Solutions
https://github.com/jcwillox/advent-of-code
advent-of-code cookiecutter cookiecutter-python cookiecutter-template
Last synced: 8 months ago
JSON representation
Multi-lang Advent of Code Cookiecutter and Solutions
- Host: GitHub
- URL: https://github.com/jcwillox/advent-of-code
- Owner: jcwillox
- License: mit
- Created: 2022-12-04T10:16:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T04:10:03.000Z (over 1 year ago)
- Last Synced: 2025-04-07T07:54:07.099Z (about 1 year ago)
- Topics: advent-of-code, cookiecutter, cookiecutter-python, cookiecutter-template
- Language: TypeScript
- Homepage:
- Size: 53.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code  [](https://github.com/cookiecutter/cookiecutter)
This repository is a cookiecutter template but it also contains my solutions which are not included when use this template. This is thanks to the way cookiecutter works, in which the top-level directory is not included in the template.
## Usage
First you need to install cookiecutter, see the [installation](https://cookiecutter.readthedocs.io/en/latest/installation.html) docs for more info.
The easiest way is usually `pip` or `pipx`:
```bash
# using pip
pip install cookiecutter
# using pipx
pipx install cookiecutter
```
**Using the template**
Running the following command will create a folder named `advent-` with a folder for each language you choose.
```bash
cookiecutter gh:jcwillox/advent-of-code
```
**Adding more days and languages**
The command above only creates 1 year, 1 language, 1 day. Naturally you might want more than that. All you need to do is run the same command again with `-f -s` in the same directory and it will add the additional files without overwriting your changes.
```bash
cookiecutter gh:jcwillox/advent-of-code -f -s
```
## Languages
### Python
The main python template uses pytest for testing which will need to be installed separately.
Requires: Python, pytest
### Typescript
The main typescript template that should support any runtime, intended for use with node. It uses vitest (and vite) for testing.
Recommends: Node 20+
You may want to use the vitest vscode extension or the `@vitest/ui` package.
### TypeScript Bun
A variant of the typescript template that uses the bun runtime.
Requires: Bun
### Typescript Node
An experimental variant of the typescript template that uses the built-in testing library added in node 22.
Requires: Node 22+
### Go
Requires: Go