Skip to content

devdutt6/aoctemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

  • A Template generator for Advent of Code hackathon 🧑‍💻.
  • It will automatically generate the input.txt file and solution.js file with the template code so you can directly start writing solution ✍️. You don't need to write the same code daily then import file and run solution on it, i handeled it for you 😎.
  • Just write your solution in solution.js file and run it using command aocrun with the character by which you want to split the filelines and it will run it 🚀.

NPM node-current

Installation


It requires global scope because i wanted to make it a CLI command so that it would be easier to run it anywhere on your machine.

npm install -g aoctemplate
yarn add aoctemplate --global

Usage


So there are 2️⃣ commands one for template generation and other for running that template after you write your solution ofcourse.

aoc <FOLDER_NAME>
aocrun <SEPARATOR_CHARACTER>

Examples

The command aoc will generate two files input.txt for pasting your puzzle input and solution.js where you will write your puzzle solution.

aoc 'day_six'

The command aocrun will parse and run on the inputs of input.txt file with the character separator which you will provide and will return the solution of your solution function from solution.js file.

aocrun '\n'

Contributing



Bugs and Issues


If you encounter any bugs 🪲 or issues 🎯, feel free to open an issue at github or email 📧📭 me on devduttchudasama1339@gmail.com. I will always like to hear from you 🧏‍♂️.