wheels watch
Watch for file changes and automatically reload the application.
Synopsis
Description
The wheels watch
command monitors your application files for changes and automatically triggers actions like reloading the application or running tests. This provides a smooth development workflow with instant feedback.
Arguments
path
Directory to watch
.
(current directory)
Options
--extensions
File extensions to watch
.cfc,.cfm,.json
--exclude
Paths to exclude
temp/,logs/,.git/
--reload-mode
Reload mode when changes detected
development
--test
Run tests on change
false
--debounce
Milliseconds to wait before reacting
500
--help
Show help information
Examples
Basic file watching
Watches current directory for .cfc
, .cfm
, and .json
changes
Watch specific directory
Watch additional file types
Exclude directories
Auto-run tests
Custom debounce timing
Default Behavior
When a file change is detected:
CFC Files (models, controllers)
Triggers application reload
Clears relevant caches
Runs tests if
--test
enabled
CFM Files (views)
Clears view cache
No full reload needed
Config Files (.json, settings.cfm)
Full application reload
Re-reads configuration
Output Example
Advanced Configuration
Create .wheels-watch.json
for project-specific settings:
Performance Considerations
Large directories may slow down watching
Use
--exclude
to skip unnecessary pathsIncrease
--debounce
for grouped changesConsider watching specific subdirectories
Integration with Editors
VS Code
Add to .vscode/tasks.json
:
Sublime Text
Create build system:
Common Patterns
Development Workflow
Frontend + Backend
Test-Driven Development
Troubleshooting
Too many file descriptors: Increase system limits or exclude more directories
Changes not detected: Check file extensions and excluded paths
Slow response: Increase debounce time or watch specific directories
Tests failing: Ensure test environment is properly configured
Notes
Requires file system events support
Some network drives may not support watching
Symbolic links are followed by default
See Also
Last updated
Was this helpful?