Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
scottydocs authored and rafaelsq committed Oct 14, 2019
1 parent 7f1c71f commit 6d0ac38
Showing 1 changed file with 31 additions and 12 deletions.
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,40 @@
[![GoDoc](https://godoc.org/github.com/rafaelsq/wtc?status.svg)](https://godoc.org/github.com/rafaelsq/wtc)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/rafaelsq/wtc/blob/master/LICENSE)

**Watch is a simple watch files utility**
You can use it to watch files and run any command.
It is not necessary to be a Golang project.
Watch is a simple watch files utility you can use to watch files and run commands.
Although the utility is written in [Go](https://golang.org/), you can use it for projects written in any programming language.

## Prerequisites

Before you begin, ensure you have installed the latest version of Go. See the [Go documentation](https://golang.org/doc/install) for details.

## How to install

```bash
$ go get -u github.com/rafaelsq/wtc
$ cd my_go_project
$ wtc -build "go build main.go" -run "./my_go_project"
```
You can install Watch as follows:

1. Install the Watch directory:

```bash
$ go get -u github.com/rafaelsq/wtc
```

2. Change directory to the project where you want to run Watch:

```bash
$ cd my_go_project
```

3. Run the following to build the utility:

```bash
$ wtc -build "go build main.go" -run "./my_go_project"
```

## How to use

You can create an Yaml file with your rules.
Default;
You can configure Watch by creating an YAML file with your own rules.

The default is:

```yaml
no_trace: false
Expand All @@ -41,5 +59,6 @@ rules:
command: "go test -cover {PKG}"
```
If you run `wtc -build "<build-cmd>" -run "<run-cmd>"`, it will replace default `command`s above.
If you create your own `.wtc.yaml` or `wtc.yaml`, no default rules will exists.
> **_Note:_** If you run `wtc -build "<build-cmd>" -run "<run-cmd>"`, the utility replaces the default commands above.

If you create your own `.wtc.yaml` or `wtc.yaml`, no default rules will exist.

0 comments on commit 6d0ac38

Please sign in to comment.