Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwel authored Dec 1, 2017
1 parent 8a2ebbc commit 1d1c174
Showing 1 changed file with 36 additions and 8 deletions.
44 changes: 36 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
rebar_auto_plugin
rebar_autotdd
=====

A rebar3 plugin for auto running compile on source file change reloading modules in the shell.
Based on rebar3_auto_plugin.


Prerequisite
-----
Expand All @@ -11,9 +13,9 @@ On Linux you need to install inotify-tools.
Use
---

Add the plugin only to your user local rebar config in `~/.config/rebar3/rebar.config`:
Add the plugin *only* to your user local rebar config in `~/.config/rebar3/rebar.config`:

{plugins, [rebar3_auto]}.
{plugins, [rebar3_autotdd]}.

If you add it to your project rebar.config, it will get unloaded each time compilation occurs, thus breaking it.

Expand All @@ -26,20 +28,46 @@ Then just call your plugin directly in an existing application:


```
(relx) $ rebar3 auto
$ rebar3 autotdd
===> Compiling rebar3_auto
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V7.1 (abort with ^G)
Erlang/OTP 20 [erts-9] [source] [64-bit]
1> ===> This feature is experimental and may be modified or removed at any time.
Compiling rebar3_auto
Verifying dependencies...
Compiling relx
Compiling rebar3_auto
Compiling rebar3_autotdd
Verifying dependencies...
Compiling relx
1>
```

## On file change
```
AUTO-TDD===============
RECOMPILING
=======================
1> Verifying dependencies...
1> Compiling myapp
1>
AUTO-TDD===============
RUNNING UNIT TESTS
=======================
1> Verifying dependencies...
1> Linking _build/default/lib/bert to _build/test/lib/bert
1> Linking _build/default/lib/erlang_rethinkdb to _build/test/lib/erlang_rethinkdb
1> Linking _build/default/lib/gproc to _build/test/lib/gproc
1> Compiling yourapp
1> Performing EUnit tests...
1> Finished in 0.953 seconds
1> 10 tests, 0 failures
1>
AUTO-TDD===============
DONE
=======================
1>
```

0 comments on commit 1d1c174

Please sign in to comment.