Source: sebastiandedeyne.com

File watching with chokidar

Category: PHP, PHP, api, api

We take them for granted because they’re often baked in, like Webpack rebuilding when you save a file. Sometimes I’m in an environment without auto-reloading to my disposal. Yesterday, I was working on a CLI tool.

First, install chokidar-cli: Then you can watch the files you’re working on, and run a command when they change. When a PHP file changes in src, the build command will run.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners