Reminds you to rerun
npm ci
locally by checking whether the npm lockfile has changed.
- Install the package to your project.
npm install -D check-lock-change
- Config scripts in package.json. Note that
LOCK_FILE
can be eitherpackage-lock.json
,npm-shrinkwrap.json
, oryarn.lock
.
{
"scripts": {
"dev": "check-lock-change [LOCK_FILE] && [OTHER DEV COMMANDS]",
"prepare": "[OTHER PREPARE COMMANDS] && cp -rf [LOCK_FILE] lockfile.copy"
}
}
- Add
lockfile.copy
to your .gitignore file.