Commit 0981411b authored by Stephane Glondu's avatar Stephane Glondu

Create a static directory

parent 89fb82cc
minimal.otarget
src/lib/lib.cma
src/web/server.cma
src/tool/belenios-tool.html.otarget
src/booth/vote.html.otarget
src/static/belenios-tool.html.otarget
src/static/vote.html.otarget
......@@ -31,11 +31,8 @@
<extension findlib-package="csv"/>
<host charset="utf-8" hostfilter="*" defaulthostname="localhost">
<site path="booth" charset="utf-8">
<static dir="_SRCDIR_/_build/src/booth" />
</site>
<site path="tool" charset="utf-8">
<static dir="_SRCDIR_/_build/src/tool" />
<site path="static" charset="utf-8">
<static dir="_SRCDIR_/_build/src/static" />
</site>
<eliom module="_build/src/web/server.cma">
<auth name="demo"><dummy/></auth>
......
......@@ -67,14 +67,6 @@ let version_rule () =
in
rule "BUILD -> belenios_version.ml" ~deps ~prod builder
let copy_ext_js_rule dir fname =
let full_name = dir / fname in
copy_rule full_name ("ext/booth/js/jscrypto" / fname) full_name
let copy_platform_js_rule dir fname =
let full_name = dir / fname in
copy_rule full_name ("src/platform/js" / fname) full_name
let () = dispatch & function
| Before_options ->
......@@ -111,10 +103,16 @@ let () = dispatch & function
platform_rules "native";
platform_rules "js";
copy_rule "jsbn.js" "ext/booth/js/jscrypto/jsbn.js" "src/static/jsbn.js";
copy_rule "jsbn2.js" "ext/booth/js/jscrypto/jsbn2.js" "src/static/jsbn2.js";
copy_rule "sjcl.js" "ext/booth/js/jscrypto/sjcl.js" "src/static/sjcl.js";
copy_rule "random.js" "src/platform/js/random.js" "src/static/random.js";
copy_rule "belenios-tool" ("src/tool/tool_cmdline" ^ exe_suffix) "belenios-tool";
List.iter (copy_ext_js_rule "src/tool") ["jsbn.js"; "jsbn2.js"; "sjcl.js"];
List.iter (copy_ext_js_rule "src/booth") ["jsbn.js"; "jsbn2.js"; "sjcl.js"];
copy_platform_js_rule "src/tool" "random.js";
copy_platform_js_rule "src/booth" "random.js";
copy_rule "belenios-tool.js" "src/tool/tool_js.js" "src/static/tool_js.js";
copy_rule "belenios-tool.html" "src/tool/belenios-tool.html" "src/static/belenios-tool.html";
copy_rule "booth.js" "src/booth/booth.js" "src/static/booth.js";
copy_rule "vote.html" "src/booth/vote.html" "src/static/vote.html";
| _ -> ()
......@@ -299,7 +299,7 @@ module Make (D : ELECTION_DATA) (P : WEB_PARAMS) : REGISTRABLE = struct
~get_params:(string "election_url")
()
let booth_path = ["booth"; "vote.html"]
let booth_path = ["static"; "vote.html"]
let root_rel_to_booth = root
|> Eliom_uri.reconstruct_relative_url_path booth_path
......
......@@ -142,7 +142,7 @@ module Make (C : CONFIG) : SITE = struct
) ()
let tool =
preapply (static_dir ()) ["tool"; "belenios-tool.html"]
preapply (static_dir ()) ["static"; "belenios-tool.html"]
let election_setup_index = service
~path:(make_path ["setup"; ""])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment