Skip to content

Max-Liu/fswatch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fswatch

Build Status

A definition of fswatch: Command line tool. Use file system event to trigger user defined commands.

fswatch will follow 3 steps.

  1. notify if file under current directory changes.
  2. filter event by .gitignore
  3. do user defined commands(passed by commands)

How to use

I will show you an example

go get github.com/shxsun/fswatch
# cd to a golang project
# ...
fswatch config.json

# open a new shell, cd to the same place
touch test.go

# now fswatch should do some tests. (if nothing happens, tell me)

#Config.json file structure

Cmd string
Path []string

Example json file:{"Cmd":"go run main.go","Path":["/Users/Max/Go/src/mathapp/","/Users/Max/Go/src/test/"]}

fswatch

Shell help

Usage:
  fswatch [OPTIONS] config_file

Help Options:
  -h, --help=    Show this help message

Application Options:
  -v, --verbose  Show verbose debug infomation
	  --delay=   Trigger event buffer time (0.5s)
  -d, --depth=   depth of watch (1)

Friendly link:

About

cli tools. watch file change, and do use specfied commands.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%