From e38aec3c6951666dad8354c0d7fd1ee14601ec4a Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Thu, 8 Dec 2022 16:20:07 -0500 Subject: [PATCH] add dependency --- _templates/day/new/part1.ejs | 10 ++++++++++ package.json | 2 ++ 2 files changed, 12 insertions(+) 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"