Permalink
Browse files

Compatibility with the recent rebar

  • Loading branch information...
1 parent 15a3c9a commit a2f34fec97b6ab6227d7911da95334da32b05cf7 @alavrik committed Oct 11, 2011
Showing with 18 additions and 6 deletions.
  1. +16 −5 README.md
  2. +2 −1 rebar.config
View
@@ -150,20 +150,30 @@ Usage instructions
For compiled modules that use Erlson syntax, the Erlson library header must be
included:
+```erlang
-include_lib("erlson/include/erlson.hrl").
-
+```
When rebar is used as a build tool, it should be configured to use
-"erlson_rebar_plugin". In order to do that, add the following line to the
+"erlson_rebar_plugin". In order to do that, add the following lines to the
project's "rebar.config" file:
- {rebar_plugins, [erlson_rebar_plugin]}.
+```erlang
+ {plugins, [erlson_rebar_plugin]}. % for newer rebar
+ {rebar_plugins, [erlson_rebar_plugin]}. % for older rebar
+ {deps,
+ [
+ {erlson, "", {git, "https://github.com/alavrik/erlson.git", {branch, "master"}}}
+ ]}.
+```
In order to use Erlson syntax from Erlang shell, run the following command (e.g.
include it in `.erlang` file):
-
+
+```erlang
erlson:init().
+```
Limitations
@@ -182,12 +192,13 @@ as a part of [Mochiweb](https://github.com/mochi/mochiweb). Erlson doesn't
automatically include it, but if you wish to do it with a rebar-enabled project,
add it as dependency in your `rebar.config`. For example:
+```erlang
{deps,
[
% we need Mochiweb for mochijson2
{mochiweb, "", {git, "https://github.com/mochi/mochiweb.git", {branch, "master"}}}
]}.
-
+```
Authors
-------
View
@@ -2,7 +2,8 @@
% running EUnit)
{lib_dirs, [".."]}.
-{rebar_plugins, [erlson_rebar_plugin]}.
+{plugins, [erlson_rebar_plugin]}. % newest rebar
+{rebar_plugins, [erlson_rebar_plugin]}. % older rebar
% version of the extended Erlang parser that generates Erlson at parse time
{sub_dirs, ["shell"]}.

0 comments on commit a2f34fe

Please sign in to comment.