mattrmiller/laravel-potion

Watching For Changes

Opened this issue · 4 comments

Is there a way you can make the artisan command watch for changes then make the assets? Like this http://symfony.com/doc/current/cookbook/assetic/asset_management.html#dumping-asset-files ?

Yes, this is something that I plan to implement into Potion.

Mind if I make a PR and try it myself?

Absolutely. That would be great! From my experience folder changes in PHP vary depending on OS. Some OS's will report a file change up the chain of folders to the parent folder you are watching. Some do not. Meaning, if there is a change two sub directories deep from the folder you are watching, the modified time will be populated up to the folder you are watching only in some OS's.

So finding the correct way in PHP to watch for folder modifications will be crucial for this approach.

I found this package on packagist. It looks like it will work but it will need testing.

https://github.com/crodas/WatchFiles