www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - emeralD - Command-line tool for template files

reply bauss <jj_1337 live.dk> writes:
emeralD is a command-line tool for template files that can be 
used to generate code files, configurations etc.

It's a very useful tool for generating files that you'd normally 
have to create by hand.

The idea for emeralD was not actually by me, but by Moogly (I 
don't know what he goes by in the forums, if he uses them.) who 
wanted something to generate files for ex. vibe.d and Diamond.

Also additionally thanks to 0xEAB for a few ideas.

emeralD is generic and not tied to D files only, but can be used 
for any type of file within any programming language.

For more information see the Github repository and for examples 
see the read me.

Github: https://github.com/DiamondMVC/emeralD

Thank you!
Jun 17 2018
next sibling parent bauss <jj_1337 live.dk> writes:
On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote:
 Github: https://github.com/DiamondMVC/emeralD

 Thank you!
Scaffolding has now been added, along with shell command passing. This makes it possible to use emeralD for like project shells, build tool combination and multiple file generation.
Jun 18 2018
prev sibling next sibling parent reply Dechcaudron <no-reply no-email.com> writes:
On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote:
 For more information see the Github repository and for examples 
 see the read me.
Could we get a complete, simple usage example? Like target directory structure and how to invoke the program to get to it.
Jun 18 2018
parent reply bauss <jj_1337 live.dk> writes:
On Monday, 18 June 2018 at 10:42:53 UTC, Dechcaudron wrote:
 On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote:
 For more information see the Github repository and for 
 examples see the read me.
Could we get a complete, simple usage example? Like target directory structure and how to invoke the program to get to it.
Simple template example for ex. a class: ``` emerald d class myclass myclass MyClass ... emerald [root] [template] [$1] [$2] [$3] ``` Will generate a file called myclass.d with the following content: ``` module myclass; class MyClass { public: this() { } } ``` An example on scaffolding ex. an empty project with a dub.json would be: ``` -sc dub myproject -ex ``` Which will basically create a Hello World! example with a minimal dub.json It's possible to fetch scaffolding archives remote, as well fetch templates online. See the --remote / -r commands for that. https://github.com/DiamondMVC/emeralD#--remote-root-template-url---rm-root-template-url https://github.com/DiamondMVC/emeralD#--remote--scaffold-name-url---rm--sc-name-url For examples on templates just see the the folders "templates" and "scaffold" in the repository.
Jun 18 2018
parent bauss <jj_1337 live.dk> writes:
On Monday, 18 June 2018 at 13:31:40 UTC, bauss wrote:

The files will be created / copied to the current working 
directory.

In the next version you'll be able to specify folders that you 
work in and give them a name which can be used to invoke emeralD 
from anywhere and still work in the directories you want.
Jun 18 2018
prev sibling parent reply biocyberman <biocyberman gmail.com> writes:
On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote:
 emeralD is a command-line tool for template files that can be 
 used to generate code files, configurations etc.

 It's a very useful tool for generating files that you'd 
 normally have to create by hand.

 The idea for emeralD was not actually by me, but by Moogly (I 
 don't know what he goes by in the forums, if he uses them.) who 
 wanted something to generate files for ex. vibe.d and Diamond.

 Also additionally thanks to 0xEAB for a few ideas.

 emeralD is generic and not tied to D files only, but can be 
 used for any type of file within any programming language.

 For more information see the Github repository and for examples 
 see the read me.

 Github: https://github.com/DiamondMVC/emeralD

 Thank you!
Sounds interesting. But the readme is missing a basic thing: a complete working example command for the impatient.
Jun 18 2018
parent Bauss <jj_1337 live.dk> writes:
On Monday, 18 June 2018 at 20:26:06 UTC, biocyberman wrote:
 On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote:
 emeralD is a command-line tool for template files that can be 
 used to generate code files, configurations etc.

 It's a very useful tool for generating files that you'd 
 normally have to create by hand.

 The idea for emeralD was not actually by me, but by Moogly (I 
 don't know what he goes by in the forums, if he uses them.) 
 who wanted something to generate files for ex. vibe.d and 
 Diamond.

 Also additionally thanks to 0xEAB for a few ideas.

 emeralD is generic and not tied to D files only, but can be 
 used for any type of file within any programming language.

 For more information see the Github repository and for 
 examples see the read me.

 Github: https://github.com/DiamondMVC/emeralD

 Thank you!
Sounds interesting. But the readme is missing a basic thing: a complete working example command for the impatient.
Ahh yes, of course! I will get to that as soon as possible.
Jun 18 2018