hygen
parent
ea5286a545
commit
a1f4d2238f
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"name": "2023",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "vitest.config.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "Yanick Champoux <yanick@babyl.ca> (http://techblog.babyl.ca/)",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"vitest": "^0.34.6"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
/// <reference types="vitest" />
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
include: ["**/*test.js"],
|
||||||
|
// ...
|
||||||
|
},
|
||||||
|
});
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
Get aoc-cli from https://github.com/scarvalhojr/aoc-cli
|
|
@ -0,0 +1,38 @@
|
||||||
|
---
|
||||||
|
to: <%= year %>/Taskfile.yaml
|
||||||
|
---
|
||||||
|
# https://taskfile.dev
|
||||||
|
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
vars:
|
||||||
|
YEAR: <%= year %>
|
||||||
|
DAY:
|
||||||
|
sh: date '+%d' | perl -pe's/^0//'
|
||||||
|
DAY_FORMATTED:
|
||||||
|
sh: date '+%d'
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
aoc-cli:install: cargo install aoc-cli
|
||||||
|
|
||||||
|
"precommit:init": pre-commit install -t pre-merge-commit -t pre-push
|
||||||
|
|
||||||
|
integrate:
|
||||||
|
cmds:
|
||||||
|
- git is-clean
|
||||||
|
- git co main
|
||||||
|
- git weld -
|
||||||
|
|
||||||
|
lint:fix:
|
||||||
|
cmds:
|
||||||
|
- npx prettier --write {{.CLI_ARGS | default "." }}
|
||||||
|
|
||||||
|
page:
|
||||||
|
cmds:
|
||||||
|
- firefox https://adventofcode.com/{{.YEAR}}/day/{{.DAY}}
|
||||||
|
|
||||||
|
download:
|
||||||
|
cmds:
|
||||||
|
- hygen day new --day {{.DAY_FORMATTED}}
|
||||||
|
- aoc download -d {{.DAY}} -o -p {{.DAY_FORMATTED}}/puzzle.md -i {{.DAY_FORMATTED}}/input
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
to: <%= year %>/package.json
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"name": "<%= year %>",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "vitest.config.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "Yanick Champoux <yanick@babyl.ca> (http://techblog.babyl.ca/)",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"vitest": "^0.34.6"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = [
|
||||||
|
{ type: 'input', name: 'year', message: 'advent year?' }
|
||||||
|
];
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
to: <%= year %>/vitest.config.js
|
||||||
|
---
|
||||||
|
/// <reference types="vitest" />
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
include: ["**/*test.js"],
|
||||||
|
// ...
|
||||||
|
},
|
||||||
|
});
|
Loading…
Reference in New Issue