Open maxandersen opened 4 years ago
I would have expected a STEF dir structure, right, @FroMage?
idea is that today we bundle some basic example templates like jbang -t qrest quarkus.java
and i was thinking we could allow something like jbang --deps org.hibernate:hibernate-core:4.6.8 hib.java
and have it create a hibernate based example.
but now seeing it its just too verbose.
maybe add templates to catalog mechanism so you can do jbang -t start-hibernate@jbangdev myapp.java
or even jbang -t start-hibernate@quintesse myapp.java
?
You guys need better defaults, I probably want jbang -t start-hibernate myapp.java
to mean jbang -t start-hibernate@jbangdev myapp.java
, no?
And if you're doing starter template code, might as well have short names such as jbang -t hibernate myapp.java
. I mean, if you need something that is not a starter you can always call it jbang -t hibernate-somethingelse myapp.java
.
I would have expected a STEF dir structure, right, @FroMage?
Well, @maxandersen has made it posterity with Math.max
so it's only fair we get our names in places, eh?
jbang --tako --gavin --stef
where --tako
is a shortcut for "I want starter templates", --gavin
for "put in hibernate stuff" and --stef
for "make sure it deploys to prod if it mostly compiles".
Agree with @FroMage ... we definitely need a --tako
option.
Well that and the fact that shorter names would be better. Perhaps we could, when dealing with templates default to using a different catalog, eg. jbang-templates
instead of jbang-catalog
. The trick would be how to make you be able to leave out the @jbangdev
part without messing up the current alias lookup mechanism.
Of course the templating system might just use different rules for lookup than aliases, where simple names that haven't resolved to files or other aliases get resolved against @jbangdev
. But I'm not sure if that would perhaps push things over some arbitrary "complexity boundary".
Sure, just put templates in your catalog repo under templates/hibernate/files…
, no? That seems simple enough.
That sounds crazy :-) How would you detect that those folders are a dep, check online? And how would you prevent folder names that by accident have the same name a s a dep to be used as such? And you'd remove a single
//DEPS
line at most, right?I think this needs some good use-cases.