NOTE: I no longer use this script since the release of turbo-ignore
(More details)
Example of a script called by vercel
Ignored Build Step
option to only build application in monorepo when changes have been detected.
node ../../scripts/ignore-step.js
More details available here
NOTE: If using Turborepo (like I am in this repo) - you can now just use
npx turbo-ignore
as your ignored build step and it figures out if your app or any of it's dependencies have changed automatically:https://vercel.com/changelog/intelligent-ignored-builds-using-turborepo