Command-line tool for generating files from templates, scaffolding, generic shell command-passing etc.
Adds a template from a remote url.
The name of the root template folder.
Example:
diamond
The name of the template to add.
Example:
view.dd
The url of the remote template.
Example:
http://website/template.d
Adds a scaffolding template from a remote url.
The name of the scaffolding template to add.
Example:
somescaffoldingtemplate
The url of the scaffolding template's archive.
Note: Must be a zip archive for now.
Example:
someremoteurl.com/somescaffoldingarchive.zip
Adds the path in which the template file will be operating on.
Example:
--path=controllers
Appends the content of the given template to the given operating path, iff the path is a file.
Example:
--append
Adds an explicit filename, that can include arguments passed.
Example:
--file=$3.txt
Scaffolds a scaffolding template into the current directory.
The name of the scaffolding template.
Example:
dub
Example:
--scaffold dub
Scaffolds a scaffolding template into the specified destination.
The name of the scaffolding template.
Example:
dub
The destination path.
Example:
myproject
Example:
--scaffold dub myproject
Scaffolds a scaffolding template into the specified destination and excludes the template name.
The name of the scaffolding template.
Example:
dub
The destination path.
Example:
myproject
Example:
--scaffold dub myproject --exclude
Sets the current working folder to the one specified by the project.
This command can be appended to --scaffold
and when using operating commands.
Example:
--project=mytest
...
--scaffold dub --project=mytest
Adds a new project to emeralD.
Projects are folders that can be invoked without being in the working folder.
This is useful to work across folders without having to manually switch around.
Example:
--project mytest /somefolder/anotherfolder/mytest
Passes the arguments on to the command-line.
Example:
--shell cd tools
--shell dub build
The name of the root template folder.
Example:
diamond
The name of the template to use.
Example:
view.dd
The name of the result. The filename will be this appended with template's extension.
Example:
home
The arguments to pass to the template.
Example:
Home
Example:
diamond view.dd home Home
The name of the root template folder.
Example:
diamond
The name of the template to use.
Example:
view.dd
The name of the result. The filename will be this appended with template's extension.
Example:
home
The arguments to pass to the template.
Example:
Home
Example:
--path=views diamond view.dd home Home
If a template file has the extension .emd then each line will represent a command that will be passed to emeralD. You can pass the current arguments on to the next command.
Example:
mvc.emd:
--path=views diamond view.dd $1 $2
--path=controllers diamond viewcontroller.d --file=$1controller $1 $2
--path=controllers/package.d --append d import.d controllers.$1controller
--path=models d class.d $1 models.$1 $2
--path=models/package.d --append d import.d models.$1
The above template file will create mvc templates for a Diamond view, model and controller.
Example cmd:
diamond mvc.emd home Home
You can build emeralD using any D compiler:
https://dlang.org/download.html
It's recommended to build using DUB:
https://code.dlang.org/download
Simply invoke the following command:
dub build