-
-
Notifications
You must be signed in to change notification settings - Fork 51
Run bbmustache from command line #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ummm.... bbmustache works like other mustache libraries, so mo is probably more convenient than bbmustache in this case. Alternatively, it makes sense to create a thin escript on demand (I do this a lot). $ cat <<EOF > make_cnf.escript
#!/usr/bin/env escript
%%! -pa _build/default/lib/bbmustache/ebin
main(_) ->
Ret = bbmustache:render(<<"{{hoge}}">>, [{"hoge", 1}]),
io:format("~p~n", [Ret]).
EOF
$ chmod +x make_cnf.escript
$ ./make_cnf.escript
<<"1">> By the way, benchmark results are created by escript. |
Both template and the erlang terms are in files. My case is I use overlay vargs I want to use to replace on template files. Eg:
|
oh, I see. it sounds good. |
Solved by #48 |
I need to instantiate templates in files using erlang terms (also in other files).
I can open a PR with Main func on bbmustache and then we rebar3 escriptalise it (same as we do for other erlang tools like elvis or rebar3).
Does it make sense ?
Thanks
The text was updated successfully, but these errors were encountered: