This repository has been archived on 2022-09-16. You can view files and clone it, but cannot push or open issues or pull requests.
tlaternet-templates/nix/utilities/update-lockfile

26 lines
369 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env bash
set -eu
cd "$(git rev-parse --show-toplevel)"
if [ -L node_modules ]; then
unlink node_modules
fi
if [ -L package.json ]; then
unlink package.json
fi
yj < package.yaml > package.json
if [ "${1}" == "--ignore-semver" ]; then
npm-check-updates -u
fi
npm install --package-lock-only
rm -rf node_modules
rm package.json
direnv reload