diff --git a/.config/wt.toml b/.config/wt.toml new file mode 100644 index 0000000..c151ea3 --- /dev/null +++ b/.config/wt.toml @@ -0,0 +1,8 @@ +# worktrunk hooks: each worktree gets its own packages, its own port and its own database file. + +[pre-start] +deps = "bun install --frozen-lockfile > /dev/null" +env = "echo PORT={{ branch | hash_port }} > .env && echo SPLITBILL_DB=splitbill_{{ branch | sanitize_db }}.sqlite >> .env" + +[pre-remove] +drop = "rm -f splitbill_{{ branch | sanitize_db }}.sqlite" diff --git a/.gitignore b/.gitignore index c2a17f1..66191ac 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules/ .factory/runs/ *.log .worktrees/ +.env