diff --git a/apps/rebar/priv/templates/app_rebar.config b/apps/rebar/priv/templates/app_rebar.config index a3f5b8c66..da3c5113f 100644 --- a/apps/rebar/priv/templates/app_rebar.config +++ b/apps/rebar/priv/templates/app_rebar.config @@ -2,6 +2,6 @@ {deps, []}. {shell, [ - % {config, "config/sys.config"}, + %% {config, "config/sys.config"}, {apps, [{{name}}]} ]}. diff --git a/apps/rebar/priv/templates/escript_rebar.config b/apps/rebar/priv/templates/escript_rebar.config index 3ed7150a0..6e7df2bd3 100644 --- a/apps/rebar/priv/templates/escript_rebar.config +++ b/apps/rebar/priv/templates/escript_rebar.config @@ -1,13 +1,13 @@ {erl_opts, [no_debug_info]}. {deps, []}. -{escript_incl_apps, - [{{name}}]}. +{escript_incl_apps, [{{name}}]}. {escript_main_app, {{name}}}. {escript_name, {{name}}}. {escript_emu_args, "%%! +sbtu +A1\n"}. -%% Profiles -{profiles, [{test, - [{erl_opts, [debug_info]} - ]}]}. +{profiles, [ + {test, [ + {erl_opts, [debug_info]} + ]} +]}. diff --git a/apps/rebar/priv/templates/otp_app.app.src b/apps/rebar/priv/templates/otp_app.app.src index db2fa300c..807987fde 100644 --- a/apps/rebar/priv/templates/otp_app.app.src +++ b/apps/rebar/priv/templates/otp_app.app.src @@ -1,16 +1,15 @@ {{=@@ @@=}} -{application, @@name@@, - [{description, "@@desc@@"}, - {vsn, "0.1.0"}, - {registered, []}, - {mod, {@@name@@_app, []}}, - {applications, - [kernel, - stdlib - ]}, - {env,[]}, - {modules, []}, - - {licenses, ["Apache-2.0"]}, - {links, []} +{application, @@name@@, [ + {description, "@@desc@@"}, + {vsn, "0.1.0"}, + {registered, []}, + {mod, {@@name@@_app, []}}, + {applications, [ + kernel, + stdlib + ]}, + {env, []}, + {modules, []}, + {licenses, ["Apache-2.0"]}, + {links, []} ]}. diff --git a/apps/rebar/priv/templates/otp_lib.app.src b/apps/rebar/priv/templates/otp_lib.app.src index 1666c6820..21f0431e6 100644 --- a/apps/rebar/priv/templates/otp_lib.app.src +++ b/apps/rebar/priv/templates/otp_lib.app.src @@ -1,14 +1,13 @@ -{application, {{name}}, - [{description, "{{desc}}"}, - {vsn, "0.1.0"}, - {registered, []}, - {applications, - [kernel, - stdlib - ]}, - {env,[]}, - {modules, []}, - - {licenses, ["Apache-2.0"]}, - {links, []} +{application, {{name}}, [ + {description, "{{desc}}"}, + {vsn, "0.1.0"}, + {registered, []}, + {applications, [ + kernel, + stdlib + ]}, + {env, []}, + {modules, []}, + {licenses, ["Apache-2.0"]}, + {links, []} ]}. diff --git a/apps/rebar/priv/templates/provider.erl b/apps/rebar/priv/templates/provider.erl index 7639d97a4..c2533ae7a 100644 --- a/apps/rebar/priv/templates/provider.erl +++ b/apps/rebar/priv/templates/provider.erl @@ -11,14 +11,14 @@ -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> Provider = providers:create([ - {name, ?PROVIDER}, % The 'user friendly' name of the task - {module, ?MODULE}, % The module implementation of the task - {bare, true}, % The task can be run by the user, always true - {deps, ?DEPS}, % The list of dependencies - {example, "rebar3 {{name}}"}, % How to use the plugin - {opts, []}, % list of options understood by the plugin - {short_desc, "{{desc}}"}, - {desc, "{{desc}}"} + {name, ?PROVIDER}, % The 'user friendly' name of the task + {module, ?MODULE}, % The module implementation of the task + {bare, true}, % The task can be run by the user, always true + {deps, ?DEPS}, % The list of dependencies + {example, "rebar3 {{name}}"}, % How to use the plugin + {opts, []}, % list of options understood by the plugin + {short_desc, "{{desc}}"}, + {desc, "{{desc}}"} ]), {ok, rebar_state:add_provider(State, Provider)}. diff --git a/apps/rebar/priv/templates/relx_rebar.config b/apps/rebar/priv/templates/relx_rebar.config index 3a19399f3..e8ba088cb 100644 --- a/apps/rebar/priv/templates/relx_rebar.config +++ b/apps/rebar/priv/templates/relx_rebar.config @@ -2,32 +2,37 @@ {erl_opts, [debug_info]}. {deps, []}. -{relx, [{release, {@@name@@, "0.1.0"}, - [@@name@@, - sasl]}, +{relx, [ + {release, {@@name@@, "0.1.0"}, [ + @@name@@, + sasl + ]}, - {mode, dev}, + {mode, dev}, - %% automatically picked up if the files - %% exist but can be set manually, which - %% is required if the names aren't exactly - %% sys.config and vm.args - {sys_config, "./config/sys.config"}, - {vm_args, "./config/vm.args"} + %% automatically picked up if the files + %% exist but can be set manually, which + %% is required if the names aren't exactly + %% sys.config and vm.args + {sys_config, "./config/sys.config"}, + {vm_args, "./config/vm.args"} - %% the .src form of the configuration files do - %% not require setting RELX_REPLACE_OS_VARS - %% {sys_config_src, "./config/sys.config.src"}, - %% {vm_args_src, "./config/vm.args.src"} + %% the .src form of the configuration files do + %% not require setting RELX_REPLACE_OS_VARS + %% {sys_config_src, "./config/sys.config.src"}, + %% {vm_args_src, "./config/vm.args.src"} ]}. -{profiles, [{prod, [{relx, - [%% prod is the default mode when prod - %% profile is used, so does not have - %% to be explicitly included like this - {mode, prod} +{profiles, [ + %% prod is the default mode when prod + %% profile is used, so does not have + %% to be explicitly included like this + {prod, [ + {relx, [ + {mode, prod} - %% use minimal mode to exclude ERTS - %% {mode, minimal} - ] - }]}]}. + %% use minimal mode to exclude ERTS + %% {mode, minimal} + ]} + ]} +]}. diff --git a/apps/rebar/priv/templates/sup.erl b/apps/rebar/priv/templates/sup.erl index 42f551165..b29be8215 100644 --- a/apps/rebar/priv/templates/sup.erl +++ b/apps/rebar/priv/templates/sup.erl @@ -27,9 +27,11 @@ start_link() -> %% type => worker(), % optional %% modules => modules()} % optional init([]) -> - SupFlags = #{strategy => one_for_all, - intensity => 0, - period => 1}, + SupFlags = #{ + strategy => one_for_all, + intensity => 0, + period => 1 + }, ChildSpecs = [], {ok, {SupFlags, ChildSpecs}}.