Skip to content

kohkimakimoto/jitome

Repository files navigation

Jitome

Build Status

logo.png

Jitome is a simple file watcher.

Table of Contents

Requirement

Go1.6 or later.

Installation

$ go get github.com/kohkimakimoto/jitome

Usage

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.

Configuration

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.

Notification

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 .

notification.png

Commands

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 .

Author

Kohki Makimoto kohki.makimoto@gmail.com

License

The MIT License (MIT)

Inspired by

About

Jitome is a simple file watcher.

Resources

License

Stars

Watchers

Forks

Packages

No packages published