Current section
13 Versions
Jump to
Current section
13 Versions
Compare versions
20
files changed
+260
additions
-29
deletions
| @@ -21,13 +21,18 @@ Then just call the plugin directly in an existing application: | |
| 21 21 | |
| 22 22 | To get a list of all available tasks for the plugin run: |
| 23 23 | |
| 24 | - $ rebar3 help clojerl |
| 25 | - ===> Compiling rebar3_clojerl |
| 24 | + ``` |
| 25 | + $ rebar3 help clojerl |
| 26 | + ===> Compiling rebar3_clojerl |
| 26 27 | |
| 27 | - clojerl <task>: |
| 28 | - compile Compile clojerl project |
| 29 | - repl Start a clojerl repl |
| 30 | - test Test clojerl project |
| 28 | + clojerl <task>: |
| 29 | + compile Compile clojerl project |
| 30 | + escriptize Generate escript archive. |
| 31 | + release Build release of Clojerl project. |
| 32 | + repl Start a clojerl repl |
| 33 | + run Run the project's -main function. |
| 34 | + test Test clojerl project |
| 35 | + ``` |
| 31 36 | |
| 32 37 | For each of these you can then get more details and available options |
| 33 38 | by running for example: |
| @@ -89,10 +94,16 @@ the available [template](#template). | |
| 89 94 | |
| 90 95 | {plugins, [rebar3_clojerl]}. |
| 91 96 | |
| 92 | - ## Template |
| 97 | + ## Templates |
| 93 98 | |
| 94 99 | When the plugin is [installed globally](#install-globally) you can use |
| 95 | - its template to create a new Clojerl application. |
| 100 | + any of the available templates: |
| 101 | + |
| 102 | + * `clojerl_app`: create a Clojerl OTP application. |
| 103 | + * `clojerl_escript`: create a Clojerl escript. |
| 104 | + * `clojerl_release`: create a Clojerl release. |
| 105 | + |
| 106 | + For example: |
| 96 107 | |
| 97 108 | rebar3 new clojerl_app awesome |
| @@ -5,11 +5,21 @@ | |
| 5 5 | [<<"LICENSE">>,<<"README.md">>,<<"priv/templates/LICENSE.tpl">>, |
| 6 6 | <<"priv/templates/README.md.tpl">>,<<"priv/templates/app.clje.tpl">>, |
| 7 7 | <<"priv/templates/app.src.tpl">>,<<"priv/templates/clojerl_app.template">>, |
| 8 | + <<"priv/templates/clojerl_escript.template">>, |
| 9 | + <<"priv/templates/clojerl_release.template">>, |
| 8 10 | <<"priv/templates/core.clje.tpl">>,<<"priv/templates/core_test.clje.tpl">>, |
| 9 | - <<"priv/templates/gitignore.tpl">>,<<"priv/templates/rebar.config.tpl">>, |
| 10 | - <<"priv/templates/sup.clje.tpl">>,<<"rebar.config">>,<<"rebar.lock">>, |
| 11 | + <<"priv/templates/escript.README.md.tpl">>, |
| 12 | + <<"priv/templates/escript.app.src.tpl">>, |
| 13 | + <<"priv/templates/escript.rebar.config.tpl">>, |
| 14 | + <<"priv/templates/gitignore.tpl">>,<<"priv/templates/name.clje.tpl">>, |
| 15 | + <<"priv/templates/rebar.config.tpl">>, |
| 16 | + <<"priv/templates/release.rebar.config.tpl">>, |
| 17 | + <<"priv/templates/sup.clje.tpl">>,<<"priv/templates/sys.config.tpl">>, |
| 18 | + <<"priv/templates/vm.args.tpl">>,<<"rebar.config">>,<<"rebar.lock">>, |
| 11 19 | <<"src/rebar3_clojerl.app.src">>,<<"src/rebar3_clojerl.erl">>, |
| 12 20 | <<"src/rebar3_clojerl.hrl">>,<<"src/rebar3_clojerl_prv_compile.erl">>, |
| 21 | + <<"src/rebar3_clojerl_prv_escriptize.erl">>, |
| 22 | + <<"src/rebar3_clojerl_prv_release.erl">>, |
| 13 23 | <<"src/rebar3_clojerl_prv_repl.erl">>,<<"src/rebar3_clojerl_prv_run.erl">>, |
| 14 24 | <<"src/rebar3_clojerl_prv_test.erl">>,<<"src/rebar3_clojerl_utils.erl">>]}. |
| 15 25 | {<<"licenses">>,[<<"Apache 2.0">>]}. |
| @@ -18,4 +28,4 @@ | |
| 18 28 | {<<"GitHub">>,<<"https://github.com/clojerl/rebar3_clojerl">>}]}. |
| 19 29 | {<<"name">>,<<"rebar3_clojerl">>}. |
| 20 30 | {<<"requirements">>,[]}. |
| 21 | - {<<"version">>,<<"0.7.0">>}. |
| 31 | + {<<"version">>,<<"0.8.0">>}. |
| @@ -1,12 +1,12 @@ | |
| 1 1 | {{name}} |
| 2 2 | ===== |
| 3 3 | |
| 4 | - {{desc}} |
| 4 | + {{description}} |
| 5 5 | |
| 6 6 | Build |
| 7 7 | ----- |
| 8 8 | |
| 9 | - $ rebar3 compile |
| 9 | + $ rebar3 clojerl compile |
| 10 10 | |
| 11 11 | Start a REPL |
| 12 12 | ---- |
| @@ -1,6 +1,6 @@ | |
| 1 | - {description, "Complete structure for a Clojerl application."}. |
| 1 | + {description, "Complete Clojerl application structure"}. |
| 2 2 | {variables, [ |
| 3 | - {name, "mylib", "Name of the Clojerl application"}, |
| 3 | + {name, "my_clojerl_app", "Name of the Clojerl application"}, |
| 4 4 | {description, "A Clojerl application", "Short description of the app"} |
| 5 5 | ]}. |
| 6 6 | {template, "core.clje.tpl", "{{name}}/src/{{name}}/core.clje"}. |
| @@ -0,0 +1,11 @@ | |
| 1 | + {description, "Complete Clojerl escriptized application structure"}. |
| 2 | + {variables, [ |
| 3 | + {name, "my_clojerl_escript", "Name of the Clojerl application"}, |
| 4 | + {description, "A Clojerl escript", "Short description of the app"} |
| 5 | + ]}. |
| 6 | + {template, "name.clje.tpl", "{{name}}/src/{{name}}.clje"}. |
| 7 | + {template, "escript.app.src.tpl", "{{name}}/src/{{name}}.app.src"}. |
| 8 | + {template, "escript.rebar.config.tpl", "{{name}}/rebar.config"}. |
| 9 | + {template, "gitignore.tpl", "{{name}}/.gitignore"}. |
| 10 | + {template, "LICENSE.tpl", "{{name}}/LICENSE"}. |
| 11 | + {template, "escript.README.md.tpl", "{{name}}/README.md"}. |
Loading more files…