Comparing version 0.4.0 to 0.5.0
@@ -7,3 +7,3 @@ #!/usr/bin/env node | ||
dotenv.config(); | ||
let all = process.argv.slice(1).map((v) => v.trim()); | ||
let all = process.argv.filter((arg) => !["npx", "pnpx", "run"].includes(arg)).map((v) => v.trim()); | ||
const [command, ...args] = all; | ||
@@ -10,0 +10,0 @@ switch (String(command || "").toLowerCase()) { |
@@ -37,3 +37,3 @@ var __defProp = Object.defineProperty; | ||
"@types/node": "^16.11.6", | ||
aocrunner: "^0.4.0", | ||
aocrunner: "^0.5.0", | ||
prettier: "^2.4.1" | ||
@@ -40,0 +40,0 @@ }, |
{ | ||
"name": "aocrunner", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Advent of Code runner", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,3 +9,5 @@ #!/usr/bin/env node | ||
let all = process.argv.slice(1).map((v) => v.trim()) | ||
let all = process.argv | ||
.filter((arg) => !["npx", "pnpx", "run"].includes(arg)) | ||
.map((v) => v.trim()) | ||
@@ -12,0 +14,0 @@ const [command, ...args] = all |
@@ -21,3 +21,3 @@ import type { Setup } from "../types/common" | ||
"@types/node": "^16.11.6", | ||
aocrunner: "^0.4.0", | ||
aocrunner: "^0.5.0", | ||
prettier: "^2.4.1", | ||
@@ -24,0 +24,0 @@ }, |
@@ -1,11 +0,32 @@ | ||
const hello = "Hello World!" | ||
import run from "aocrunner" | ||
const a = (x, y) => { | ||
return x + y | ||
const parseInput = (rawInput) => rawInput | ||
const solution1 = async (rawInput) => { | ||
const input = parseInput(rawInput) | ||
// Solution: | ||
} | ||
const b = a(5, 6) | ||
const solution2 = async (rawInput) => { | ||
const input = parseInput(rawInput) | ||
console.log(hello) | ||
// Solution: | ||
} | ||
// export default hello | ||
run({ | ||
part1: { | ||
tests: [ | ||
// { input: ``, expected: "" }, | ||
// { input: ``, expected: "" }, | ||
], | ||
solution: solution1, | ||
}, | ||
part2: { | ||
tests: [ | ||
// { input: ``, expected: "" }, | ||
// { input: ``, expected: "" }, | ||
], | ||
solution: solution2, | ||
}, | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
88681
1768