diff --git a/_templates/day/new/part1.ejs b/_templates/day/new/part1.ejs index 97460f5..14531b0 100644 --- a/_templates/day/new/part1.ejs +++ b/_templates/day/new/part1.ejs @@ -3,4 +3,14 @@ to: 2022/<%= day %>/part1.js --- import * as R from "remeda"; +import { readFile } from "../05/part1.js"; + +const readInput = (...args) => + readFile(...args) + .split("\n") + .filter((x) => x); + +export const puzzleInput = readInput(import.meta.url, "input"); +export const sample = readInput(import.meta.url, "sample"); + export default = () => {}; diff --git a/package.json b/package.json index c1baac4..232dcb9 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,10 @@ "author": "Yanick Champoux (http://techblog.babyl.ca/)", "license": "ISC", "dependencies": { + "@a-robu/victor": "^2.2.2", "debug": "^4.3.4", "fs-extra": "^11.1.0", + "memoizerific": "^1.11.3", "prettier": "^2.8.0", "remeda": "^1.3.0", "vitest": "^0.25.3"