Are you sure you need an engine? Start with plain erb and see how it fits to your needs.
Also look at how rails generates scaffolds.
···
21:10, 17 августа 2015 г., Gerald Bauer gerald.bauer@gmail.com:
Hello,
Before I start coding yet another static code generator (from
templates) I’d appreciate any insight. Maybe I’m missing some gems,
tools, etc.Ideally there’s a generic tool like g8 in scala [1] that lets you
host your template in a git repo and using$ g8 new test/gem --name=Hola
will download the repo, ask for the configuration parameters and
merge the templates to generate ready to use code.I know hoe includes sow e.g.
$ sow Hola
or there’s the oldie newgem e.g.
$ newgem Hola
But sow and newgem, for example, are kind of “hard-coded”. You
cannot reuse the “built-in” code generator or use a different (remote)
template repo.If found boilerplater [2] by Michal Fojtik but it looks it’s not
even used by Michal any longer itself (only has one example sinatra
example as a gist repo).Anyways, if you have any comments or insight - greatly appreciated.
Cheers.
[1] GitHub - foundweekends/giter8: a command line tool to apply templates defined on GitHub
[2] GitHub - mfojtik/boilerplater: Simple boiler plate system to bootstrap dev of new applications
–
Отправлено из мобильного приложения Яндекс.Почты