Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/raphamorim/wat

[fsnotify] A cross-platform File Watcher that runs specific tasks when specific files are added, changed or deleted
https://github.com/raphamorim/wat

file fsnotify linux osx watch watches windows

Last synced: 2 months ago
JSON representation

[fsnotify] A cross-platform File Watcher that runs specific tasks when specific files are added, changed or deleted

Awesome Lists containing this project

README

        

# wat

> Fast File Watcher

Run specific tasks when specific files are added, changed or deleted

## Usage

Install by doing:

```go
go get -u github.com/raphamorim/wat
```

Then simply run:

```bash
wat
```

Example using `date` command:

```bash
wat src/ date
```

Returns for every file update inside `src` folder:

```
Waiting...
Sat Oct 29 15:34:23 BRST 2016
```

## Comparison

wat vs [grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch)

![wat vs grunt-contrib-watch](./images/example.gif)

## FAQs

#### EMFILE: Too many opened files.?

This is because of your system's max opened file limit. For OSX the default is very low (256). Temporarily increase your limit with `ulimit -n 10480`, the number being the new max limit.

In some versions of OSX the above solution doesn't work. In that case try `launchctl limit maxfiles 10480 10480` and restart your terminal. See here.