Open yurrriq opened 8 years ago
What about just making this a plugin? That's where I thought you were going with this repo :-)
E.g.:
$ rebar3 lfe new lib my-lib
ltool will add the repo to its deps, so users of ltool will be able to run rebar3 lfe
commands like the above ...
ltool will eventually have a cli alias so that all rebar3 lfe ...
commands will just be ltool ...
commands, e.g.:
$ ltool new lib my-lib
Yeah, that could be cool. I wonder what the minimum plugin looks like. Do we need to provide a provider
or can we just refer to this repo as a plugin and have its templates become available to users?
If we must provide a provider
maybe we can just have a rebar3 lfe install-templates
command instead of the make
target described above.
1) One of the most minimal lfe rebar3 plugins:
2) I'd prefer we kept to the same namespace as the other LFE plugins -- that will make life easier for ltool (the ulimate replacement for lfetool) ... ltool will be replacing all ltool
commands with rebar3 lfe
commands ... it would be a shame to have a series of cases, each with a different potential set of commands that ltool will have to parse and replace ...
3) What make
target are you referring to?
1) I'll have to check it out.
2) Agreed. I edited my comment shortly after posting.
3) Just the hypothetical make install-templates
that would copy them to ~/.config/rebar3/templates
.
Ah, I see (#3).
So it looks like we're talking about two different and equally valid use cases (among potentially more):
Also, you might want to checkout the work that @arpunk did here:
Having the templates in a separate repository like this enables users to install them manually in their
~/.config/rebar3/templates/
. We could provide amake
target for convenience. According to therebar3
docs, we could put the templates in thepriv
directory of a plugin, e.g. lfe-compile and they would be visible to users of the plugin.There are pros and cons to both approaches. Let's discuss.