Jitome is a simple file watcher.
Table of Contents
Go1.6 or later.
$ go get github.com/kohkimakimoto/jitome
Run jitome -i
to create jitome.yml
file that is a main configuration file for Jitome.
# Jitome is a simple file watcher. - https://github.com/kohkimakimoto/jitome
# tasks.
tasks:
build:
notification: true
watch:
- base: ''
ignore: ['\.git$']
pattern: '\.go$'
script: |
go build .
Run jitome
.
$ jitome
[jitome] starting jitome...
[jitome] loading config 'jitome.yml'
[jitome] activating task 'build'.
[jitome] watching files...
Jitome starts watching file changing. So if you modify files, Jitome report as the following.
[jitome] 'build' task detected 'main.go' changing by event 'create'.
[jitome] 'build' task running script...
[jitome] 'build' task finished script.
Default configuration file that Jitome uses is jitome.yml
at the current directory. you can change it by using -c
option.
The following is an example of the configuration.
build:
watch:
- base: ''
ignore: ['\.git$']
pattern: '\.go$'
script: |
go build .
test:
watch:
- base: ''
ignore: ['\.git$']
pattern: '\.go$'
script: |
go test .
Each task as the above example build
and test
defines watching patterns and a script that runs when it detects file changing.
Tasks support desktop notification (Mac OS X only). Set notification
property true
.
tasks:
build:
notification: true
watch:
- base: ''
ignore: ['\.git$']
pattern: '\.go$'
script: |
go build .
Jitome supports to run arbitrary commands, when Jitome runs.
See the below example:
commands:
- 'echo foo'
- 'echo bar'
tasks:
build:
watch:
- base: ''
ignore: ['\.git$']
pattern: '\.go$'
script: |
go build .
Kohki Makimoto kohki.makimoto@gmail.com
The MIT License (MIT)