Skip to content

Commit be8f842

Browse files
committed
Doc: environment variable
1 parent be5bf51 commit be8f842

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

manual/environment-variable.wiki

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
= Environment variables
2+
3+
To resolve an environment variable, js_of_ocaml will perform the
4+
following steps, in the given order:
5+
6+
- If the variable was set at compile time with the [--setenv VAR] flag, return it.
7+
- If running nodejs and the variable is set in the process environment ([process.env]), return it.
8+
- If the variable is set in [globalThis.jsoo_env], return it. This can be used
9+
to set an environment variable inside a web-browser.
10+
- Return Not_found

manual/menu.wiki

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
==[[library|Library overview]]
55
==[[bindings|Binding a JS library]]
66
==[[rev-bindings|Export OCaml code to JavaScript]]
7+
==[[environment-variable|Environment variable]]
78
==<<a_api subproject="js_of_ocaml" text="API"|index>>
89

910
=Wasm_of_ocaml - Reference Manual

0 commit comments

Comments
 (0)