Ruby Static Code Generator (From Templates) - Any Links? Gems? What's the "State-of-the-Art"?

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


Отправлено из мобильного приложения Яндекс.Почты

Hello,

  Thanks for your comments.

Also look at how rails generates scaffolds.

   That's the idea. Ideally there's something like rails application
templates but more "generic", that is, that works for everything e.g.
plain ruby etc. If anyone has any pointers, let us know.

  Cheers.

PS: I've just put together an "engine" e.g. mrh/mrhyde [1] - that is,
specific to static sites (e.g. jekyll). The idea is to make it more
"generic" so it works for gem starter templates, sinatra starter
templates, gli starter templates, etc.

[1] GitHub - quikstart/mrhyde: mrhyde-tools gem - static site quick starter script wizard .:. jekyll command line tool