gin icon indicating copy to clipboard operation
gin copied to clipboard

Restart when template files were edited

Open runemadsen opened this issue 9 years ago • 10 comments

Right now gin only listens to .go files, which requires me to restart the server to see changes to .html files. It might be useful to be able to specify extra file extension to watch.

runemadsen avatar Nov 16 '14 17:11 runemadsen

+1

joshkamau avatar Nov 24 '14 11:11 joshkamau

+1

bikbah avatar Dec 10 '14 11:12 bikbah

+1

534N avatar Dec 14 '14 05:12 534N

My (albeit barbaric) solution was fork the repo and check if the extension is .go or .html, and I use that binary instead.

https://github.com/bcspragu/gin/commit/4f3b70d3b27a5685428592b96af622d4a15350f4

bcspragu avatar Dec 21 '14 17:12 bcspragu

@bcspragu: very useful addition. make a pull request?

gobijan avatar Jan 05 '15 17:01 gobijan

In it's current state, it's too specific. I'll turn it into a command line flag that takes a list of extensions to allow, and I'll make a pull request of that.

bcspragu avatar Jan 05 '15 18:01 bcspragu

A better approach would allow some cli arguments. @codeskyblue does a really good job with a JSON config file: https://github.com/codeskyblue/fswatch/blob/master/fswatch.go#L231

drewwells avatar Jan 16 '15 21:01 drewwells

+1

kmulvey avatar Jan 27 '15 01:01 kmulvey

thanks @drewwells for using fswatch. Use a config file like json is very useful when monitor is complex, I have been using this way for a long time.

codeskyblue avatar Jan 27 '15 13:01 codeskyblue

+1

bravadomizzou avatar Feb 03 '15 03:02 bravadomizzou