so it begins
This commit is contained in:
parent
eee25031e3
commit
2967c0e9d3
8
2021/10/part1.mjs
Normal file
8
2021/10/part1.mjs
Normal file
@ -0,0 +1,8 @@
|
||||
import fs from "fs-extra";
|
||||
import fp from "lodash/fp.js";
|
||||
import _ from "lodash";
|
||||
|
||||
export const processInput = (input) => input;
|
||||
|
||||
export function solution(input) {
|
||||
}
|
8
2021/10/part2.mjs
Normal file
8
2021/10/part2.mjs
Normal file
@ -0,0 +1,8 @@
|
||||
import fs from "fs-extra";
|
||||
import fp from "lodash/fp.js";
|
||||
import _ from "lodash";
|
||||
|
||||
import * as p1 from './part1.mjs';
|
||||
|
||||
export function solution(input) {
|
||||
}
|
20
2021/10/test.mjs
Normal file
20
2021/10/test.mjs
Normal file
@ -0,0 +1,20 @@
|
||||
// https://adventofcode.com/2021/day/10
|
||||
|
||||
import tap from "tap";
|
||||
import fs from "fs-extra";
|
||||
|
||||
import * as p1 from "./part1.mjs";
|
||||
import * as p2 from "./part2.mjs";
|
||||
|
||||
const sample = p1.processInput('sample');
|
||||
const input = p1.processInput('input');
|
||||
|
||||
tap.test("part1", async (t) => {
|
||||
t.equal(p1.solution(await sample), 0);
|
||||
// t.equal(p1.solution(await input), 0);
|
||||
});
|
||||
|
||||
tap.test("part2", async (t) => {
|
||||
// t.equal(p2.solution(await sample), 0);
|
||||
// t.equal(p2.solution(await input), 0);
|
||||
});
|
11
2021/_templates/day/new/part1.mjs.t
Normal file
11
2021/_templates/day/new/part1.mjs.t
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
to: '<%= day %>/part1.mjs'
|
||||
---
|
||||
import fs from "fs-extra";
|
||||
import fp from "lodash/fp.js";
|
||||
import _ from "lodash";
|
||||
|
||||
export const processInput = (input) => input;
|
||||
|
||||
export function solution(input) {
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
to: '<%= day %>/part1.pm'
|
||||
---
|
||||
package part1;
|
||||
|
||||
use 5.34.0;
|
||||
use warnings;
|
||||
use experimental 'signatures';
|
||||
|
||||
use List::AllUtils qw/ /;
|
||||
|
||||
sub solution() {
|
||||
}
|
||||
|
||||
1;
|
11
2021/_templates/day/new/part2.mjs.t
Normal file
11
2021/_templates/day/new/part2.mjs.t
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
to: '<%= day %>/part2.mjs'
|
||||
---
|
||||
import fs from "fs-extra";
|
||||
import fp from "lodash/fp.js";
|
||||
import _ from "lodash";
|
||||
|
||||
import * as p1 from './part1.mjs';
|
||||
|
||||
export function solution(input) {
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
---
|
||||
to: '<%= day %>/part2.pm'
|
||||
---
|
||||
package part2;
|
||||
|
||||
use 5.20.0;
|
||||
use warnings;
|
||||
use experimental 'signatures';
|
||||
|
||||
use List::AllUtils qw/ /;
|
||||
|
||||
require './part1.pm';
|
||||
|
||||
use experimental qw/ signatures postderef /;
|
||||
|
||||
sub solution() {
|
||||
}
|
||||
|
||||
1;
|
23
2021/_templates/day/new/test.mjs.t
Normal file
23
2021/_templates/day/new/test.mjs.t
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
to: '<%= day %>/test.mjs'
|
||||
---
|
||||
// https://adventofcode.com/2021/day/<%= day %>
|
||||
|
||||
import tap from "tap";
|
||||
import fs from "fs-extra";
|
||||
|
||||
import * as p1 from "./part1.mjs";
|
||||
import * as p2 from "./part2.mjs";
|
||||
|
||||
const sample = p1.processInput('sample');
|
||||
const input = p1.processInput('input');
|
||||
|
||||
tap.test("part1", async (t) => {
|
||||
t.equal(p1.solution(await sample), 0);
|
||||
// t.equal(p1.solution(await input), 0);
|
||||
});
|
||||
|
||||
tap.test("part2", async (t) => {
|
||||
// t.equal(p2.solution(await sample), 0);
|
||||
// t.equal(p2.solution(await input), 0);
|
||||
});
|
@ -1,20 +0,0 @@
|
||||
---
|
||||
to: '<%= day %>/test.t'
|
||||
---
|
||||
use 5.34.0;
|
||||
|
||||
use Test2::V0;
|
||||
use Path::Tiny;
|
||||
|
||||
require './part1.pm';
|
||||
require './part2.pm';
|
||||
|
||||
subtest part1 => sub {
|
||||
my $todo = todo 'TODO';
|
||||
is part1::solution( ) => 'TODO';
|
||||
};
|
||||
|
||||
subtest part2 => sub {
|
||||
my $todo = todo 'TODO';
|
||||
is part2::solution( ) => 'TODO';
|
||||
};
|
Loading…
Reference in New Issue
Block a user