Run a command when files change

To run a command when files change, you can use chokidar:

npx chokidar "**/*.mdx" -c "npm run build"

(You’ll need node.js for this to work.)