summaryrefslogtreecommitdiff
path: root/priv/templates
diff options
context:
space:
mode:
Diffstat (limited to 'priv/templates')
-rw-r--r--priv/templates/LICENSE (renamed from priv/templates/LICENSE.dtl)0
-rw-r--r--priv/templates/Makefile (renamed from priv/templates/Makefile.dtl)0
-rw-r--r--priv/templates/README.md (renamed from priv/templates/README.md.dtl)0
-rw-r--r--priv/templates/app.erl (renamed from priv/templates/app.erl.dtl)0
-rw-r--r--priv/templates/app.template14
-rw-r--r--priv/templates/cmake.template2
-rw-r--r--priv/templates/escript.template11
-rw-r--r--priv/templates/escript_README.md14
-rw-r--r--priv/templates/escript_mod.erl17
-rw-r--r--priv/templates/escript_rebar.config13
-rw-r--r--priv/templates/gitignore (renamed from priv/templates/gitignore.dtl)0
-rw-r--r--priv/templates/lib.template12
-rw-r--r--priv/templates/mod.erl (renamed from priv/templates/mod.erl.dtl)0
-rw-r--r--priv/templates/otp_app.app.src (renamed from priv/templates/otp_app.app.src.dtl)0
-rw-r--r--priv/templates/otp_lib.app.src (renamed from priv/templates/otp_lib.app.src.dtl)0
-rw-r--r--priv/templates/plugin.erl (renamed from priv/templates/plugin.erl.dtl)0
-rw-r--r--priv/templates/plugin.template12
-rw-r--r--priv/templates/plugin_README.md (renamed from priv/templates/plugin_README.md.dtl)0
-rw-r--r--priv/templates/rebar.config (renamed from priv/templates/rebar.config.dtl)0
-rw-r--r--priv/templates/release.template18
-rw-r--r--priv/templates/relx_rebar.config (renamed from priv/templates/relx_rebar.config.dtl)0
-rw-r--r--priv/templates/sup.erl (renamed from priv/templates/sup.erl.dtl)0
-rw-r--r--priv/templates/sys.config (renamed from priv/templates/sys.config.dtl)0
-rw-r--r--priv/templates/vm.args (renamed from priv/templates/vm.args.dtl)0
24 files changed, 84 insertions, 29 deletions
diff --git a/priv/templates/LICENSE.dtl b/priv/templates/LICENSE
index 41588ab..41588ab 100644
--- a/priv/templates/LICENSE.dtl
+++ b/priv/templates/LICENSE
diff --git a/priv/templates/Makefile.dtl b/priv/templates/Makefile
index d3c3767..d3c3767 100644
--- a/priv/templates/Makefile.dtl
+++ b/priv/templates/Makefile
diff --git a/priv/templates/README.md.dtl b/priv/templates/README.md
index 5507536..5507536 100644
--- a/priv/templates/README.md.dtl
+++ b/priv/templates/README.md
diff --git a/priv/templates/app.erl.dtl b/priv/templates/app.erl
index 83eb9a3..83eb9a3 100644
--- a/priv/templates/app.erl.dtl
+++ b/priv/templates/app.erl
diff --git a/priv/templates/app.template b/priv/templates/app.template
index b17e30c..4087e5e 100644
--- a/priv/templates/app.template
+++ b/priv/templates/app.template
@@ -3,10 +3,10 @@
{name, "mylib", "Name of the OTP application"},
{desc, "An OTP application", "Short description of the app"}
]}.
-{template, "app.erl.dtl", "{{name}}/src/{{name}}_app.erl"}.
-{template, "sup.erl.dtl", "{{name}}/src/{{name}}_sup.erl"}.
-{template, "otp_app.app.src.dtl", "{{name}}/src/{{name}}.app.src"}.
-{template, "rebar.config.dtl", "{{name}}/rebar.config"}.
-{template, "gitignore.dtl", "{{name}}/.gitignore"}.
-{template, "LICENSE.dtl", "{{name}}/LICENSE"}.
-{template, "README.md.dtl", "{{name}}/README.md"}.
+{template, "app.erl", "{{name}}/src/{{name}}_app.erl"}.
+{template, "sup.erl", "{{name}}/src/{{name}}_sup.erl"}.
+{template, "otp_app.app.src", "{{name}}/src/{{name}}.app.src"}.
+{template, "rebar.config", "{{name}}/rebar.config"}.
+{template, "gitignore", "{{name}}/.gitignore"}.
+{template, "LICENSE", "{{name}}/LICENSE"}.
+{template, "README.md", "{{name}}/README.md"}.
diff --git a/priv/templates/cmake.template b/priv/templates/cmake.template
index b3f23e8..2874c8a 100644
--- a/priv/templates/cmake.template
+++ b/priv/templates/cmake.template
@@ -1,2 +1,2 @@
{description, "Makefile for building C/C++ in c_src"}.
-{template, "Makefile.dtl", "c_src/Makefile"}.
+{template, "Makefile", "c_src/Makefile"}.
diff --git a/priv/templates/escript.template b/priv/templates/escript.template
new file mode 100644
index 0000000..c0afd3c
--- /dev/null
+++ b/priv/templates/escript.template
@@ -0,0 +1,11 @@
+{description, "Escriptized application"}.
+{variables, [
+ {name, "mylib", "Name of the OTP application to be escriptized"},
+ {desc, "An escript", "Short description of the project"}
+]}.
+{template, "escript_mod.erl", "{{name}}/src/{{name}}.erl"}.
+{template, "otp_lib.app.src", "{{name}}/src/{{name}}.app.src"}.
+{template, "escript_rebar.config", "{{name}}/rebar.config"}.
+{template, "gitignore", "{{name}}/.gitignore"}.
+{template, "LICENSE", "{{name}}/LICENSE"}.
+{template, "escript_README.md", "{{name}}/README.md"}.
diff --git a/priv/templates/escript_README.md b/priv/templates/escript_README.md
new file mode 100644
index 0000000..577d679
--- /dev/null
+++ b/priv/templates/escript_README.md
@@ -0,0 +1,14 @@
+{{name}}
+=====
+
+{{desc}}
+
+Build
+-----
+
+ $ rebar3 escriptize
+
+Run
+---
+
+ $ _build/default/bin/{{name}}
diff --git a/priv/templates/escript_mod.erl b/priv/templates/escript_mod.erl
new file mode 100644
index 0000000..f8a779b
--- /dev/null
+++ b/priv/templates/escript_mod.erl
@@ -0,0 +1,17 @@
+-module({{name}}).
+
+%% API exports
+-export([main/1]).
+
+%%====================================================================
+%% API functions
+%%====================================================================
+
+%% escript Entry point
+main(Args) ->
+ io:format("Args: ~p~n", [Args]),
+ erlang:halt(0).
+
+%%====================================================================
+%% Internal functions
+%%====================================================================
diff --git a/priv/templates/escript_rebar.config b/priv/templates/escript_rebar.config
new file mode 100644
index 0000000..196f835
--- /dev/null
+++ b/priv/templates/escript_rebar.config
@@ -0,0 +1,13 @@
+{erl_opts, [no_debug_info]}.
+{deps, []}.
+
+{escript_incl_apps,
+ [{{name}}]}.
+{escript_top_level_app, {{name}}}.
+{escript_name, {{name}}}.
+{escript_emu_args, "%%! +sbtu +A0\n"}.
+
+%% Profiles
+{profiles, [{test,
+ [{erl_opts, [debug_info]}
+ ]}]}.
diff --git a/priv/templates/gitignore.dtl b/priv/templates/gitignore
index 40a1d4f..40a1d4f 100644
--- a/priv/templates/gitignore.dtl
+++ b/priv/templates/gitignore
diff --git a/priv/templates/lib.template b/priv/templates/lib.template
index 4b9a75d..cbb3672 100644
--- a/priv/templates/lib.template
+++ b/priv/templates/lib.template
@@ -3,9 +3,9 @@
{name, "mylib", "Name of the OTP library application"},
{desc, "An OTP library", "Short description of the app"}
]}.
-{template, "mod.erl.dtl", "{{name}}/src/{{name}}.erl"}.
-{template, "otp_lib.app.src.dtl", "{{name}}/src/{{name}}.app.src"}.
-{template, "rebar.config.dtl", "{{name}}/rebar.config"}.
-{template, "gitignore.dtl", "{{name}}/.gitignore"}.
-{template, "LICENSE.dtl", "{{name}}/LICENSE"}.
-{template, "README.md.dtl", "{{name}}/README.md"}.
+{template, "mod.erl", "{{name}}/src/{{name}}.erl"}.
+{template, "otp_lib.app.src", "{{name}}/src/{{name}}.app.src"}.
+{template, "rebar.config", "{{name}}/rebar.config"}.
+{template, "gitignore", "{{name}}/.gitignore"}.
+{template, "LICENSE", "{{name}}/LICENSE"}.
+{template, "README.md", "{{name}}/README.md"}.
diff --git a/priv/templates/mod.erl.dtl b/priv/templates/mod.erl
index 2f5e09e..2f5e09e 100644
--- a/priv/templates/mod.erl.dtl
+++ b/priv/templates/mod.erl
diff --git a/priv/templates/otp_app.app.src.dtl b/priv/templates/otp_app.app.src
index 5188f56..5188f56 100644
--- a/priv/templates/otp_app.app.src.dtl
+++ b/priv/templates/otp_app.app.src
diff --git a/priv/templates/otp_lib.app.src.dtl b/priv/templates/otp_lib.app.src
index 3adefeb..3adefeb 100644
--- a/priv/templates/otp_lib.app.src.dtl
+++ b/priv/templates/otp_lib.app.src
diff --git a/priv/templates/plugin.erl.dtl b/priv/templates/plugin.erl
index abf4648..abf4648 100644
--- a/priv/templates/plugin.erl.dtl
+++ b/priv/templates/plugin.erl
diff --git a/priv/templates/plugin.template b/priv/templates/plugin.template
index 3419191..0181bd2 100644
--- a/priv/templates/plugin.template
+++ b/priv/templates/plugin.template
@@ -3,9 +3,9 @@
{name, "myplugin", "Name of the plugin"},
{desc, "A rebar plugin", "Short description of the plugin's purpose"}
]}.
-{template, "plugin.erl.dtl", "{{name}}/src/{{name}}.erl"}.
-{template, "otp_lib.app.src.dtl", "{{name}}/src/{{name}}.app.src"}.
-{template, "rebar.config.dtl", "{{name}}/rebar.config"}.
-{template, "gitignore.dtl", "{{name}}/.gitignore"}.
-{template, "LICENSE.dtl", "{{name}}/LICENSE"}.
-{template, "plugin_README.md.dtl", "{{name}}/README.md"}.
+{template, "plugin.erl", "{{name}}/src/{{name}}.erl"}.
+{template, "otp_lib.app.src", "{{name}}/src/{{name}}.app.src"}.
+{template, "rebar.config", "{{name}}/rebar.config"}.
+{template, "gitignore", "{{name}}/.gitignore"}.
+{template, "LICENSE", "{{name}}/LICENSE"}.
+{template, "plugin_README.md", "{{name}}/README.md"}.
diff --git a/priv/templates/plugin_README.md.dtl b/priv/templates/plugin_README.md
index 7f9ba84..7f9ba84 100644
--- a/priv/templates/plugin_README.md.dtl
+++ b/priv/templates/plugin_README.md
diff --git a/priv/templates/rebar.config.dtl b/priv/templates/rebar.config
index f618f3e..f618f3e 100644
--- a/priv/templates/rebar.config.dtl
+++ b/priv/templates/rebar.config
diff --git a/priv/templates/release.template b/priv/templates/release.template
index e350130..a15d163 100644
--- a/priv/templates/release.template
+++ b/priv/templates/release.template
@@ -3,12 +3,12 @@
{name, "myapp", "Name of the OTP release. An app with this name will also be created."},
{desc, "An OTP application", "Short description of the release's main app's purpose"}
]}.
-{template, "app.erl.dtl", "{{name}}/{{apps_dir}}/{{name}}/src/{{name}}_app.erl"}.
-{template, "sup.erl.dtl", "{{name}}/{{apps_dir}}/{{name}}/src/{{name}}_sup.erl"}.
-{template, "otp_app.app.src.dtl", "{{name}}/{{apps_dir}}/{{name}}/src/{{name}}.app.src"}.
-{template, "relx_rebar.config.dtl", "{{name}}/rebar.config"}.
-{template, "sys.config.dtl", "{{name}}/config/sys.config"}.
-{template, "vm.args.dtl", "{{name}}/config/vm.args"}.
-{template, "gitignore.dtl", "{{name}}/.gitignore"}.
-{template, "LICENSE.dtl", "{{name}}/LICENSE"}.
-{template, "README.md.dtl", "{{name}}/README.md"}.
+{template, "app.erl", "{{name}}/{{apps_dir}}/{{name}}/src/{{name}}_app.erl"}.
+{template, "sup.erl", "{{name}}/{{apps_dir}}/{{name}}/src/{{name}}_sup.erl"}.
+{template, "otp_app.app.src", "{{name}}/{{apps_dir}}/{{name}}/src/{{name}}.app.src"}.
+{template, "relx_rebar.config", "{{name}}/rebar.config"}.
+{template, "sys.config", "{{name}}/config/sys.config"}.
+{template, "vm.args", "{{name}}/config/vm.args"}.
+{template, "gitignore", "{{name}}/.gitignore"}.
+{template, "LICENSE", "{{name}}/LICENSE"}.
+{template, "README.md", "{{name}}/README.md"}.
diff --git a/priv/templates/relx_rebar.config.dtl b/priv/templates/relx_rebar.config
index e7505eb..e7505eb 100644
--- a/priv/templates/relx_rebar.config.dtl
+++ b/priv/templates/relx_rebar.config
diff --git a/priv/templates/sup.erl.dtl b/priv/templates/sup.erl
index a2e7209..a2e7209 100644
--- a/priv/templates/sup.erl.dtl
+++ b/priv/templates/sup.erl
diff --git a/priv/templates/sys.config.dtl b/priv/templates/sys.config
index 7fd6bcb..7fd6bcb 100644
--- a/priv/templates/sys.config.dtl
+++ b/priv/templates/sys.config
diff --git a/priv/templates/vm.args.dtl b/priv/templates/vm.args
index a8a43f0..a8a43f0 100644
--- a/priv/templates/vm.args.dtl
+++ b/priv/templates/vm.args