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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners