Skip to content

Commit 26eacd7

Browse files
committed
Add some documentation, update the README.md
This is the first barely usable version of port_compiler. The README has been updated in anticipation of soliciting testing by other folks. Signed-off-by: Brian L. Troutwine <[email protected]>
1 parent 01a0ea9 commit 26eacd7

File tree

3 files changed

+30
-19
lines changed

3 files changed

+30
-19
lines changed

CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## How to Contribute
2+
3+
Things that would be fine indeed:
4+
5+
* pull requests
6+
* issue tickets
7+
* emails with questions and/or concerns to `[email protected]`
8+
9+
`<3`

README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
port_compiler
22
=====
33

4-
a rebar3 port compiler for native code
4+
A port compiler for rebar3.
55

6-
Build
7-
-----
8-
9-
$ rebar3 compile
6+
This plugin is intended to replicate the rebar2 support for compiling native
7+
code. It is not a drop-in replacement in terms of command-line interface but the
8+
exact configuration interface in projects' `rebar.config`s have been preserved.
109

1110
Use
1211
---
1312

14-
Add the plugin to your rebar config:
13+
Add the plugin to your `rebar.config`:
1514

1615
{plugins, [
17-
{ port_compiler, ".*", {git, "git@host:user/port_compiler.git", {tag, "0.1.0"}}}
16+
{ pc, {git, "git@github.com:blt/port_compiler.git", {tag, "0.1.0"}}}
1817
]}.
1918

20-
Then just call your plugin directly in an existing application:
19+
From your existing application:
20+
2121

22+
$ rebar3 pc compile
23+
===> Fetching pc
24+
===> Compiling pc
25+
===> Verifying dependencies...
26+
Compiling ...
2227

23-
$ rebar3 port_compiler
24-
===> Fetching port_compiler
25-
===> Compiling port_compiler
26-
<Plugin Output>
28+
You should now have native code compiled.

src/pc.erl

+7-7
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@
9393
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
9494
init(State) ->
9595
Provider = providers:create([
96-
{name, ?PROVIDER}, % The 'user friendly' name of the task
97-
{module, ?MODULE}, % The module implementation of the task
98-
{bare, true}, % The task can be run by the user, always true
99-
{deps, ?DEPS}, % The list of dependencies
100-
{example, "rebar pc"}, % How to use the plugin
101-
{opts, []}, % list of options understood by the plugin
102-
{short_desc, "a rebar3 port compiler for native code"},
96+
{name, ?PROVIDER}, %% The 'user friendly' name of the task
97+
{module, ?MODULE}, %% The module implementation of the task
98+
{bare, true}, %% The task can be run by the user, always true
99+
{deps, ?DEPS}, %% The list of dependencies
100+
{example, "rebar pc compile"}, %% How to use the plugin
101+
{opts, []}, %% list of options understood by the plugin
102+
{short_desc, "A port compiler for rebar3."},
103103
{desc, ""}
104104
]),
105105
{ok, rebar_state:add_provider(State, Provider)}.

0 commit comments

Comments
 (0)