Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vans163/rebar3_auto
Rebar3 plugin to auto compile and reload on file change.
https://github.com/vans163/rebar3_auto
Last synced: 8 days ago
JSON representation
Rebar3 plugin to auto compile and reload on file change.
- Host: GitHub
- URL: https://github.com/vans163/rebar3_auto
- Owner: vans163
- License: other
- Created: 2014-11-23T20:58:22.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-01-06T15:58:28.000Z (10 months ago)
- Last Synced: 2024-10-18T05:08:02.581Z (22 days ago)
- Language: Erlang
- Homepage:
- Size: 27.3 KB
- Stars: 55
- Watchers: 3
- Forks: 14
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Erlang - Rebar3 plugin to auto compile and reload on file change. (Build Tools)
- fucking-awesome-elixir - rebar3_auto - Rebar3 plugin to auto compile and reload on file change. (Build Tools)
- awesome-elixir - rebar3_auto - Rebar3 plugin to auto compile and reload on file change. (Build Tools)
README
rebar_auto_plugin
=====A rebar3 plugin for auto running compile on source file change reloading modules in the shell.
Prerequisite
-----
On Linux you need to install inotify-tools.```
-m: 1: inotifywait: not found
```Use
---Add the plugin only to your user local rebar config in `~/.config/rebar3/rebar.config`:
```erlang
{plugins, [rebar3_auto]}.
```If you add it to your project rebar.config, it will get unloaded each time compilation occurs, thus breaking it.
Then run
```
$ rebar3 compile
```Then just call your plugin directly in an existing application:
```
(relx) $ rebar3 auto
===> 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)
1> ===> This feature is experimental and may be modified or removed at any time.
Compiling rebar3_auto
Verifying dependencies...
Compiling relx
Compiling rebar3_auto
Verifying dependencies...
Compiling relx1>
```Custom extensions, thanks abxy.
Regex matches are supported, "$" is suffixed automatically, thanks xuchaoqian.
```
re:run(<<"file_name.erl_ab">>, <>)
``````
To extend the list add an option to your rebar.config like so:{extra_extensions, [".alp", ".hterl", ".erl(.*?)"]}.
```