Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 34 lines (32 sloc) 964 Bytes
#!/usr/bin/env escript
%% -*- erlang -*-
%% edown is designed to work well with rebar, but in order to use edown
%% to document itself, we need to explicitly set the path to ebin/, so
%% that we pick up the newly built edown doclet. I haven't found a way
%% to do this with 'rebar doc'.
main([]) ->
Default = "esl",
U = case os:getenv("TGT") of
[] -> Default;
false -> Default;
Str -> Str
TopURL = "" ++ U ++ "/edown",
io:fwrite("Making edown docs for [~s]...~n", [TopURL]),
R = edoc:application(edown, ".",
[{doclet, edown_doclet},
{source_path, ["src"]},
{stylesheet, ""}, % don't copy stylesheet.css
{image, ""}, % don't copy erlang.png
{"./", TopURL}}]),
case R of
ok ->
Err ->
io:fwrite("~p~n", [Err]),
Something went wrong with that request. Please try again.