Skip to content

Commit ecb9903

Browse files
jaredlyjordwalke
authored andcommitted
move things around, add docs
1 parent 418722e commit ecb9903

10 files changed

Lines changed: 23 additions & 8 deletions

File tree

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
build:
22
jbuilder build
33

4+
run: build
5+
./_build/install/default/bin/react_native_project
6+
47
test:
58
jbuilder runtest
69

internal-lib/m2.re

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11

22
(* we can have ocaml as well as reason sources *)
33
let opt = Re.opt
4+
5+
let format = "OCaml"

internal_lib/m2.re

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
let y = "testing";
3+
4+
/* Getting a value from another file within this directory */
5+
let z = "value from " ^ (M1.format);
6+
7+
/* Getting a value from a library (specified in ./jbuild) */
8+
let rx = Re.str "hello";

reason-native-project/jbuild

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
(library
44
((name reason_native_lib)
5+
; this will be exported & installable as a library via OPAM
56
(public_name reason-native-project)
67
(libraries (re))))

reason_native_project/jbuild

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(jbuild_version 1)
2+
3+
(executable
4+
((name test)
5+
; This will be installable as a global binary via opam
6+
(public_name react_native_project)
7+
; and it depends on 2 local libraries
8+
(libraries (internal_lib reason-native-project))))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ let msg = "Hello Reason!";
66
print_string msg;
77
print_newline ();
88
print_string "!!!!!!\n";
9+
print_endline Internal_lib.M2.z;
910

1011
let a = Reason_native_lib.M1.answer;
1112
Printf.printf "Answer: %d\n" a

0 commit comments

Comments
 (0)