air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.35k stars 771 forks source link

Feature Request: Specify Directories for Non-Rebuild Watch with Custom Command Execution #540

Open saturn4er opened 4 months ago

saturn4er commented 4 months ago

Description: I propose the introduction of a feature that allows specifying certain directories to be monitored without triggering a full application rebuild. Instead, when changes are detected in these directories, a predefined command (e.g., npm build) would be executed.

Use Case: In our current setup, we have a Node.js project nested within a Go project. The Node.js component is solely responsible for building JavaScript and CSS files. These files are then directly served by the Go application from the filesystem. Given this architecture, it's unnecessary for the entire application to undergo a rebuild whenever changes are made to the JS or CSS files. A more efficient approach would be to simply rebuild the JS and CSS assets.