Skip to content

Commit

Permalink
Merge pull request #77 from ocpmax/chrome-api
Browse files Browse the repository at this point in the history
cleanup names
  • Loading branch information
maxtori authored May 15, 2020
2 parents afbafbd + e9f2ed4 commit ebb29f0
Show file tree
Hide file tree
Showing 22 changed files with 8,118 additions and 14,304 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ test: build
cp _obuild/main/main.js test

chrome-extension-example: build
cp _obuild/background/background.js examples/chrome-extension
cp _obuild/popup/popup.js examples/chrome-extension
cp _obuild/options/options.js examples/chrome-extension
cp _obuild/chrome_example/chrome_example.js examples/chrome-extension
cp _obuild/background-example/background-example.js examples/chrome-extension
cp _obuild/popup-example/popup-example.js examples/chrome-extension
cp _obuild/options-example/options-example.js examples/chrome-extension
cp _obuild/chrome-example/chrome-example.js examples/chrome-extension

include autoconf/Makefile.rules
20 changes: 19 additions & 1 deletion build.ocp2
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,22 @@ if( Sys.file_exists(dirname + "/" + filename_ocp2) ){ include filename_ocp2; }
filename_ocp2 = "ocp-autoconf.d/config.ocp2inc";
if( Sys.file_exists(dirname + "/" + filename_ocp2) ){ include filename_ocp2; }

pp_js = { pp = [ "%{js_of_ocaml-ppx_SRC_DIR}%/ppx.exe"; "--as-pp" ] };
pp_js = { pp = [ "%{js_of_ocaml-ppx_SRC_DIR}%/ppx.exe"; "--as-pp" ] };

function js_program(name, file, libs){
OCaml.program(name, ocaml + {
has_asm = false;
requires = libs;
files = [ file, pp_js ];
build_rules = [
"%{" + name + "_FULL_DST_DIR}%/" + name + ".js", {
build_target = true;
sources = [ "%{" + name + "_FULL_DST_DIR}%/" + name + ".byte" ];
commands = [
OCaml.system([
"js_of_ocaml";
"--pretty";
"%{" + name + "_FULL_DST_DIR}%/" + name + ".byte";
])]}]
});
}
Loading

0 comments on commit ebb29f0

Please sign in to comment.