emerald 0.0.1
Command-line tool for template files useful for generating code files, configurations etc.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
emeralD
Command-line tool for template files useful for generating code files, configurations etc.
Control Commands
--remote [root] [template] [url]
Adds a template from a remote url.
root
The name of the root template folder.
Example:
diamond
template
The name of the template to add.
Example:
view.dd
url
The url of the remote template.
Example:
http://website/template.d
--path=[path]
Adds the path in which the template file will be operating on.
Example:
--path=controllers
--append
Appends the content of the given template to the given operating path, iff the path is a file.
Example:
--append
Operating Arguments:
[root] [template] [name ($1)] [args ($2 - $x) ...]
root
The name of the root template folder.
Example:
diamond
template
The name of the template to use.
Example:
view.dd
name ($1)
The name of the result. The filename will be this appended with template's extension.
Example:
home
args ($2 - $x) ...
The arguments to pass to the template.
Example:
Home
Example:
diamond view.dd home Home
[control commands ...] [root] [template] [name ($1)] [args ($2 - $x) ...]
root
The name of the root template folder.
Example:
diamond
template
The name of the template to use.
Example:
view.dd
name ($1)
The name of the result. The filename will be this appended with template's extension.
Example:
home
args ($2 - $x) ...
The arguments to pass to the template.
Example:
Home
Example:
--path=views diamond view.dd home Home
.emd files:
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
Building emeralD
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
- Registered by Jacob Jensen
- 0.0.1 released 6 years ago
- DiamondMVC/emeralD
- The MIT License (MIT)
- Copyright © 2018 Diamond MVC
- Authors:
- Dependencies:
- none
- Versions:
-
0.0.2 2018-Jun-18 0.0.1 2018-Jun-17 ~master 2018-Jun-20 ~0.0.2 2018-Jun-18 ~0.0.1 2018-Jun-17 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
17 downloads total
-
- Score:
- 0.8
- Short URL:
- emerald.dub.pm