Skip to content

Commit

Permalink
Remove command line switch for debug, if its needed, should be runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
daleharvey committed Nov 26, 2011
1 parent 97c01e7 commit 465e59c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/erldocs_core.erl
Expand Up @@ -3,13 +3,8 @@
-export([mapreduce/4, pmapreduce/4, pmapreduce/5]).
-include_lib("kernel/include/file.hrl").

-ifdef(DEBUG).
-define(LOG(Str, Args), io:format(Str, Args)).
-define(LOG(Str), io:format(Str)).
-else.
-define(LOG(_Str, _Args), ok).
-define(LOG(_Str), ok).
-endif.

%% @doc Copy static files
-spec copy_static_files(list()) -> ok.
Expand Down Expand Up @@ -201,16 +196,16 @@ javascript_index(Conf, FIndex) ->
[Else, App, NMod, fmt("~ts", [string:substr(Sum, 1, 50)])]
end,

Index =
Index =
lists:map(
fun([A,B,C,[]]) ->
fmt("['~s','~s','~s',[]]", [A,B,C]);
([A,B,C,D]) ->
fmt("['~s','~s','~s','~s']", [A,B,C,D])
end,
end,
lists:sort(fun sort_index/2, lists:map(F, FIndex))),
Js = re:replace(fmt("var index = [~s];", [string:join(Index, ",")]),

Js = re:replace(fmt("var index = [~s];", [string:join(Index, ",")]),
"\\n|\\r", "", [{return,list}]),

ok = file:write_file([dest(Conf), "/erldocs_index.js"], Js).
Expand Down

0 comments on commit 465e59c

Please sign in to comment.