diff --git a/priv/compile-parser b/priv/compile-parser deleted file mode 100755 index 4fb1efc..0000000 --- a/priv/compile-parser +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env escript - -%% Compiles a parser module for the API blueprint format from the Neotoma -%% grammar file. - -main(_) -> - DepsDir = os:getenv("REBAR_DEPS_DIR"), - Neotoma = DepsDir ++ "/neotoma/ebin", - code:add_pathz(filename:absname(Neotoma)), - neotoma:file("priv/katt_blueprint.peg", [{output, "src/"}]). diff --git a/rebar.config b/rebar.config index 99733a0..45b8570 100644 --- a/rebar.config +++ b/rebar.config @@ -32,9 +32,8 @@ , [ {rebar3_lint, "3.2.6"} ]}. -{post_hooks, [{compile, "./priv/compile-parser"}]}. -{escript_name, "katt"}. -{escript_emu_args, "%%! -noinput\n"}. +{plugins, [rebar3_neotoma_plugin]}. +{provider_hooks, [{pre, [{compile, {neotoma, compile}}]}]}. { elvis , [#{ dirs => ["src", "test"] diff --git a/priv/katt_blueprint.peg b/src/katt_blueprint.peg similarity index 100% rename from priv/katt_blueprint.peg rename to src/katt_blueprint.peg