Skip to content

Deno CLI to run and solve Advent of Code 2022 exercises

License

Notifications You must be signed in to change notification settings

tiberius-s/advnt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2022

Finding solutions to the 2022 Advent of code and playing around with Deno

Usage

Basic

The project is set up as a CLI and has a day command that takes a kebab-case string to denote the date:

deno run --allow-read=. main.ts day one

Compile to Executable

Compile the project with the permissions flags and run the CLI with an executable

deno compile --allow-read=. main.ts
# compilation output ensues
./advnt day one

Oh no, how do I get rid of this thing? Just...

rm advnt

Install Globally

Alternatively, the program can be installed and run with the advnt name

First, we install the package globally and give it permission to read the hd when installing

deno install --allow-read=. main.ts
# ... installation logs to stdout
advnt day one

Uninstalling is a breeze

deno uninstall advnt

Run a Specific Solution

Lastly, you can use the -p or --part flag to run either part one or two of the day's solution

advnt day one -p two

TODOs

  • Set up tests for each day. Day 1 has a very small, initial one,but the ideal is to have the test file set up with the example given and use the tests for a TDD approach to a solution.
  • This project probably needs import maps set up, but still learning the ways of Deno

About

Deno CLI to run and solve Advent of Code 2022 exercises

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published