tlaternet-webserver/templates/.envrc
Tristan Daniël Maat 9fb195819e
templates: Handle package.json conversion in direnv
By splitting out the check for package.yaml into a separate check, we
can avoid the constant massive shell reloads for the nix shell.
2022-10-05 12:34:43 +01:00

11 lines
314 B
Plaintext

nix_direnv_watch_file package-lock.json
use flake ..#templates
# Update package.json
if ! cmp --silent .checksum-package.yaml <(sha256sum package.yaml); then
echo "Updating package.json"
unlink ./package.json
yj < ./package.yaml > ./package.json
sha256sum package.yaml > .checksum-package.yaml
fi