| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
added
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets a plugin define templates to be loaded:
$ rebar3 new
...
proper (plugin): A basic PropEr suite for an OTP application
...
$ rebar3 new help proper
proper:
plugin template (...)
Description: A basic PropEr suite for an OTP application
Variables:
name="suite" (...)
...
→ rebar3 new proper fakesuite
===> Writing test/prop_fakesuite.erl
In this case, proper is a fake template file I've put by hand in
_build/default/plugins/rebar3_proper/priv/<somename>/, meaning it will
only work as far as it's called from the project's root.
The priority order of plugins is now .config > plugin > built-in, such
that someone could ensure plugins do not crush their own private
templates, but also that custom or plugin templates do overtake built-in
ones. It used to be Built-in > .config only.
Templates are searched for recursively in the priv/ directory of
plugins.
|
|
|
|
|
|
|
|
| |
This should fix #955
The test is implicit as a bad index previously silently crashed rebar3.
By adding the bad index to the `new` suite's files, we can show that
things keep running.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
error before:
===> Uncaught error: {'EXIT',
{badarg,
[{io,format,
[<0.23.0>,
"\e[0;36m===> Skipping template ~p, due to presence of a custom template at ~s~n~n\e[0m",
["/home/mariano/.config/rebar3/templates/fn_app/fn_app.template"]],
[]},
{rebar_templater,prioritize_templates,2,
[{file,"src/rebar_templater.erl"},{line,330}]},
{rebar_templater,find_templates,1,
[{file,"src/rebar_templater.erl"},{line,274}]},
{rebar_templater,new,4,
[{file,"src/rebar_templater.erl"},{line,47}]},
{rebar_prv_new,do,1,
[{file,"src/rebar_prv_new.erl"},{line,44}]},
{rebar_core,do,2,
[{file,"src/rebar_core.erl"},{line,129}]},
{rebar3,main,1,
[{file,"src/rebar3.erl"},{line,46}]},
{escript,run,2,
[{file,"escript.erl"},{line,752}]}]}}
|
| |
|
| |
|
| |
|
|
|
|
| |
- Includes tests for templates and their application
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Templates should only be in ~/.rebar3/templates and the built-in ones,
bar some specific overrides someone may want.
Looking recursively for templates in the CWD (.) may end up searching
nearly forever if the project is being created at the top of a very deep
directory tree, with extremely unlikely chances to find relevant
templates.
It causes more problems than benefits.
|
|
|
|
|
|
| |
- The OTP app template now adds the supevisor
- The default apps_dir value does not contain the trailing '/' that the
template index already added.
|
| |
|
| |
|
|
|
|
|
| |
This totally breaks compatibility with rebar2, and maybe it shouldn't
have.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
If you happen to fetch a zip archive of the git repo and try to build
from that, you may, for example, ask erlc to build src/._rebar.erl.
._* are OS X resource forks and not real .erl files. This may also
happen with network filesystems on OS X. To fix that, limit the
files compiled by rebar to include only those which start with
a letter or a digit.
|
|\
| |
| | |
Switch template instructions
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Running 'rebar list-templates' can take quite a long time, when it has
to search the file system. To fix that, make list-templates not recurse
by default. To enable recursion, run 'rebar -r list-templates'.
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
Support reading mustache 'lists' from files
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit add support for reading mustache 'lists' from files, so you
can use the list section functionality when templating things.
An example of the list syntax is as follows:
{package_commands, {list, [[{name, "riak"}], [{name, "riak-admin"}], [{name, "search-cmd"}]]}}.
Then you can, for each of the list elements, render some text:
{{#package_commands}}
chmod +x bin/{{name}}
{{/package_commands}}
|
|/
|
|
|
| |
* allow plugins to print help message for implemented commands
* append core rebar.config options to common 'rebar help' message
|
| |
|
| |
|
| |
|