caderek / aocrunner

Advent of Code runner
ISC License
163 stars 23 forks source link

Multi Year Support #31

Closed terryaney closed 7 months ago

terryaney commented 9 months ago

Various improvements and multi year support. See my repo for idea of what it now looks like.

  1. Instead of replicating aocrunner every year, each year is nested under src\NNNN where NNNN is the year.

    1. npm start now requires a year and day parameter, e.g. npm start 2019 1
    2. update:readme now requires a year parameter, e.g. npm run update:readme 2019
    3. build now requires a year parameter, e.g. npm run build 2019
  2. Readme improvements

    1. There is a global readme summarizing 'year' results.
    2. Each year has a readme summarizing 'day' results (mostly same as before with some typo fixes/formatting).
    3. Each day has a readme summarizing solutions in the Results section.
    4. The year and day readmes also pull the puzzle/day titles.
    5. Same as the previous year readme, the global and day readmes automatically update when submitting solutions (or when update:readme is ran).
  3. Puzzle automation improvements

    1. Puzzle title is pulled and stored in readme files and .aocrunner.json file.
    2. The sample input is attempted to be pulled and if successful and a {testData} placeholder is found in the template index.ts file, it will be replaced with the sample input.
  4. Core Updates

    1. Obviously had to pass 'year' around to several of the core functions.
    2. Refactored Config object definition to support multiple years.
    3. Added src/template to tsconfig.json exclude list.
    4. Changed the tsconfig.json outdir to ./lib to match the build script (in attempt to support VS Code debugging).