feat: 开发期 workerman 热重载脚本(dev:watch)
- scripts/dev-watch.sh:优先 fswatch(brew install fswatch),未安装自动回退 PHP 轮询;监听 app/plugins/routes/config/.env 的 php/json 变化 → 自动 workerman:serve restart - scripts/dev-watch.php:纯 PHP mtime 轮询兜底(跨平台,零依赖) - composer 增加 dev:watch 命令 - 实测:touch 配置触发自动重启,新代码生效;生产仍用 restart 手动部署
This commit is contained in:
@@ -70,6 +70,9 @@
|
||||
"@php artisan config:clear --ansi",
|
||||
"@php artisan test"
|
||||
],
|
||||
"dev:watch": [
|
||||
"bash scripts/dev-watch.sh"
|
||||
],
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi",
|
||||
|
||||
Reference in New Issue
Block a user