Skip to content

Commit bb8700f

Browse files
committed
fix doc
1 parent 6335f60 commit bb8700f

File tree

4 files changed

+14
-21
lines changed

4 files changed

+14
-21
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ eunit:
2222
@./rebar3 eunit
2323

2424
edoc:
25-
@./rebar3 as dev edoc
25+
@./rebar3 as doc edoc
2626

2727
start:
2828
@./rebar3 as dev shell

doc/bbmustache.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ __abstract datatype__: `template()`
136136
## Function Index ##
137137

138138

139-
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#compile-2">compile/2</a></td><td>Equivalent to <a href="#compile-3"><tt>compile(Template, Data, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#compile-3">compile/3</a></td><td>Embed the data in the template.</td></tr><tr><td valign="top"><a href="#default_partial_file_reader-2">default_partial_file_reader/2</a></td><td>Default partial file reader.</td></tr><tr><td valign="top"><a href="#default_value_serializer-1">default_value_serializer/1</a></td><td>Default value serializer for templtated values.</td></tr><tr><td valign="top"><a href="#main-1">main/1</a></td><td>escript entry point.</td></tr><tr><td valign="top"><a href="#parse_binary-1">parse_binary/1</a></td><td>Equivalent to <a href="#parse_binary-2"><tt>parse_binary(Bin, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#parse_binary-2">parse_binary/2</a></td><td>Create a <a href="#template-0"><code>template/0</code></a> from a binary.</td></tr><tr><td valign="top"><a href="#parse_file-1">parse_file/1</a></td><td>Equivalent to <a href="#parse_file-2"><tt>parse_file(Filename, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#parse_file-2">parse_file/2</a></td><td>Create a <a href="#template-0"><code>template/0</code></a> from a file.</td></tr><tr><td valign="top"><a href="#render-2">render/2</a></td><td>Equivalent to <a href="#render-3"><tt>render(Bin, Data, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#render-3">render/3</a></td><td>Equivalent to <a href="#compile-3"><tt>compile(parse_binary(Bin), Data, Options)</tt></a>.</td></tr></table>
139+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#compile-2">compile/2</a></td><td>Equivalent to <a href="#compile-3"><tt>compile(Template, Data, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#compile-3">compile/3</a></td><td>Embed the data in the template.</td></tr><tr><td valign="top"><a href="#default_partial_file_reader-2">default_partial_file_reader/2</a></td><td>Default partial file reader.</td></tr><tr><td valign="top"><a href="#default_value_serializer-1">default_value_serializer/1</a></td><td>Default value serializer for templtated values.</td></tr><tr><td valign="top"><a href="#parse_binary-1">parse_binary/1</a></td><td>Equivalent to <a href="#parse_binary-2"><tt>parse_binary(Bin, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#parse_binary-2">parse_binary/2</a></td><td>Create a <a href="#template-0"><code>template/0</code></a> from a binary.</td></tr><tr><td valign="top"><a href="#parse_file-1">parse_file/1</a></td><td>Equivalent to <a href="#parse_file-2"><tt>parse_file(Filename, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#parse_file-2">parse_file/2</a></td><td>Create a <a href="#template-0"><code>template/0</code></a> from a file.</td></tr><tr><td valign="top"><a href="#render-2">render/2</a></td><td>Equivalent to <a href="#render-3"><tt>render(Bin, Data, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#render-3">render/3</a></td><td>Equivalent to <a href="#compile-3"><tt>compile(parse_binary(Bin), Data, Options)</tt></a>.</td></tr></table>
140140

141141

142142
<a name="functions"></a>
@@ -196,17 +196,6 @@ default_value_serializer(Integer::number() | binary() | string() | atom()) -&gt;
196196

197197
Default value serializer for templtated values
198198

199-
<a name="main-1"></a>
200-
201-
### main/1 ###
202-
203-
<pre><code>
204-
main(Args::string()) -&gt; ok
205-
</code></pre>
206-
<br />
207-
208-
escript entry point
209-
210199
<a name="parse_binary-1"></a>
211200

212201
### parse_binary/1 ###

rebar.config

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,16 @@
4545
{dev, [{erl_opts, [{d, bbmustache_escriptize}]},
4646
{deps,
4747
[
48-
{edown, ".*", {git, "git://github.com/uwiger/edown.git", {branch, "master"}}},
4948
{getopt, "1.0.1"}
5049
]},
5150
{plugins, [rebar3_git_vsn]},
5251
{provider_hooks, [{post, [{compile, git_vsn}]}]}
5352
]},
53+
{doc, [{deps,
54+
[
55+
{edown, ".*", {git, "git://github.com/uwiger/edown.git", {branch, "master"}}}
56+
]}
57+
]},
5458
{bench, [{deps,
5559
[
5660
{mustache, ".*", {git, "git://github.com/mojombo/mustache.erl", {tag, "v0.1.1"}}}

src/bbmustache.erl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,7 @@ is_recursive_data(_) -> false.
700700

701701
-ifdef(bbmustache_escriptize).
702702

703-
%% @doc escript entry point
704-
%% @private
703+
%% escript entry point
705704
-spec main([string()]) -> ok.
706705
main(Args) ->
707706
%% Load the application to be able to access its information
@@ -716,7 +715,7 @@ main(Args) ->
716715
halt(1)
717716
end.
718717

719-
%% @doc Processes command-line commands (render, ...)
718+
%% Processes command-line commands
720719
-spec process_commands([getopt:option()], [string()]) -> ok.
721720
process_commands(Opts, Cmds) ->
722721
HasHelp = proplists:is_defined(help, Opts),
@@ -728,7 +727,7 @@ process_commands(Opts, Cmds) ->
728727
true -> process_render(Opts, Cmds)
729728
end.
730729

731-
%% @doc Returns command-line options.
730+
%% Returns command-line options.
732731
-spec option_spec_list() -> [getopt:option_spec()].
733732
option_spec_list() ->
734733
[
@@ -739,6 +738,7 @@ option_spec_list() ->
739738
{data_file, $d, "data-file", string, "Erlang terms file."}
740739
].
741740

741+
%% Processes render
742742
-spec process_render([getopt:option()], [string()]) -> ok.
743743
process_render(Opts, TemplateFileNames) ->
744744
DataFileNames = proplists:get_all_values(data_file, Opts),
@@ -754,12 +754,12 @@ process_render(Opts, TemplateFileNames) ->
754754
end
755755
end, TemplateFileNames).
756756

757-
%% @doc Prints usage/help.
757+
%% Prints usage/help.
758758
-spec print_help(getopt:output_stream()) -> ok.
759759
print_help(OutputStream) ->
760760
getopt:usage(option_spec_list(), escript:script_name(), "template_files ...", OutputStream).
761761

762-
%% @doc Prints version.
762+
%% Prints version.
763763
-spec print_version() -> ok.
764764
print_version() ->
765765
Vsn = case application:get_key(bbmustache, vsn) of
@@ -773,7 +773,7 @@ print_version() ->
773773
%% e.g. bbmustache v1.9.0+build.5.ref90a0afd4f2
774774
io:format("bbmustache v~s~s~n", [Vsn, AdditionalVsn]).
775775

776-
%% @doc Read the data-file and return terms.
776+
%% Read the data-file and return terms.
777777
-spec read_data_files(file:filename_all()) -> [term()].
778778
read_data_files(Filename) ->
779779
case file:consult(Filename) of

0 commit comments

Comments
 (0)