codeskyblue / fswatch

Watch file change, and trigger commands. (Cross platform)
Apache License 2.0
345 stars 61 forks source link

Pass config file as a flag, using YAML as fallback #11

Closed jeromenerf closed 8 years ago

jeromenerf commented 8 years ago

It seems common to trigger different actions for the files being watched.

For a golang webapp, you may watch go and tmpl file extensions and use go run as the command. For stylesheets, you may watch sass file extension and use gosass as the command.

It would be convenient to be able to pass the configurations file as a parameter to fswatch, so we could define different strategies.

We actually forked a previous version a while ago to achive that : https://github.com/klacointe/fswatch/commit/a34d3fced59ed6e504964c2c9da29b2e52b342d9

Here's a new one.

codeskyblue commented 8 years ago

Thanks.

A little need to change before merge.

configfile := flag.String("config", FWCONFIG_YAML, "Show version") // version?

Don't worry, I'll do that.

jeromenerf commented 8 years ago

Thanks!

Sorry for this typo.

On Fri, Apr 1, 2016 at 2:22 AM, shengxiang notifications@github.com wrote:

Merged #11 https://github.com/codeskyblue/fswatch/pull/11.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/codeskyblue/fswatch/pull/11#event-610617064

Jérôme Andrieux