Skip to content

lewxdev/advent-of-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🎄 Advent of Code

This repository includes my personal solution framework for the Advent of Code challenges. Capabilities include:

  • Automatic setup - creates files for challenges and input data
  • Easy submission - submit solutions directly from the command line

Setup

Important

Be sure Deno is installed before proceeding. If not, follow the steps in the provided guide.

  1. Clone the repository

    git clone https://github.com/lewxdev/advent-of-code.git
    cd advent-of-code
  2. Create a .env file

    echo "AOC_SESSION=your_session_id" > .env

    Replace your_session_id with the session cookie found on the Advent of Code website. You can find this by authenticating in a browser and copying the value of the session cookie from the developer tools.

Usage

  1. Run the setup script

    deno run dev

    This will prompt you to enter the event year and day, and create the necessary files.

  2. Run the dev script

    deno run dev path/to/solution

    This will run the script in watch mode and prompt you to submit when the solution changes. Alternatively, you can open the script in Visual Studio Code and run the deno: dev task from the command palette.

Important

When providing a filepath, be sure the path is a valid import path (e.g. relative to the project root: ./2020/01/main.ts or an absolute path: /home/user/projects/advent-of-code/2020/01/main.ts). An error will be thrown if the path is invalid.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published