@ -0,0 +1,11 @@ | |||||
{description, "Escriptized application"}. | |||||
{variables, [ | |||||
{name, "mylib", "Name of the OTP application to be escriptized"}, | |||||
{desc, "An escript", "Short description of the project"} | |||||
]}. | |||||
{template, "escript_mod.erl", "{{name}}/src/{{name}}.erl"}. | |||||
{template, "otp_lib.app.src", "{{name}}/src/{{name}}.app.src"}. | |||||
{template, "escript_rebar.config", "{{name}}/rebar.config"}. | |||||
{template, "gitignore", "{{name}}/.gitignore"}. | |||||
{template, "LICENSE", "{{name}}/LICENSE"}. | |||||
{template, "escript_README.md", "{{name}}/README.md"}. |
@ -0,0 +1,14 @@ | |||||
{{name}} | |||||
===== | |||||
{{desc}} | |||||
Build | |||||
----- | |||||
$ rebar3 escriptize | |||||
Run | |||||
--- | |||||
$ _build/default/bin/{{name}} |
@ -0,0 +1,17 @@ | |||||
-module({{name}}). | |||||
%% API exports | |||||
-export([main/1]). | |||||
%%==================================================================== | |||||
%% API functions | |||||
%%==================================================================== | |||||
%% escript Entry point | |||||
main(Args) -> | |||||
io:format("Args: ~p~n", [Args]), | |||||
erlang:halt(0). | |||||
%%==================================================================== | |||||
%% Internal functions | |||||
%%==================================================================== |
@ -0,0 +1,13 @@ | |||||
{erl_opts, [no_debug_info]}. | |||||
{deps, []}. | |||||
{escript_incl_apps, | |||||
[{{name}}]}. | |||||
{escript_top_level_app, {{name}}}. | |||||
{escript_name, {{name}}}. | |||||
{escript_emu_args, "%%! +sbtu +A0\n"}. | |||||
%% Profiles | |||||
{profiles, [{test, | |||||
[{erl_opts, [debug_info]} | |||||
]}]}. |