-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alban Gruin <alban.gruin@univ-tlse3.fr>
- Loading branch information
Showing
11 changed files
with
67 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(* This file is part of Learn-OCaml | ||
* | ||
* Copyright (C) 2020 Alban Gruin. | ||
* | ||
* Learn-OCaml is distributed under the terms of the MIT license. See the | ||
* included LICENSE file for details. *) | ||
|
||
class type learnocaml_config = object | ||
method enableTryocaml: bool Js.optdef_prop | ||
method enableLessons: bool Js.optdef_prop | ||
method enableExercises: bool Js.optdef_prop | ||
method enableToplevel: bool Js.optdef_prop | ||
method enablePlayground: bool Js.optdef_prop | ||
method txtLoginWelcome: Js.js_string Js.t Js.optdef_prop | ||
method txtNickname: Js.js_string Js.t Js.optdef_prop | ||
method root: Js.js_string Js.t Js.optdef_prop | ||
end | ||
|
||
let config : learnocaml_config Js.t = Js.Unsafe.js_expr "learnocaml_config" | ||
let api_server = Js.(to_string (Optdef.get config##.root (fun () -> string ""))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
(* This file is part of Learn-OCaml | ||
* | ||
* Copyright (C) 2020 Alban Gruin. | ||
* | ||
* Learn-OCaml is distributed under the terms of the MIT license. See the | ||
* included LICENSE file for details. *) | ||
|
||
(* This is not transpiled to learnocaml-static.js, but is an interface | ||
to the values stored in this file. It is "statically linked" with | ||
learnocaml-common.ml. *) | ||
|
||
class type learnocaml_config = object | ||
method enableTryocaml: bool Js.optdef_prop | ||
method enableLessons: bool Js.optdef_prop | ||
method enableExercises: bool Js.optdef_prop | ||
method enableToplevel: bool Js.optdef_prop | ||
method enablePlayground: bool Js.optdef_prop | ||
method txtLoginWelcome: Js.js_string Js.t Js.optdef_prop | ||
method txtNickname: Js.js_string Js.t Js.optdef_prop | ||
method root: Js.js_string Js.t Js.optdef_prop | ||
end | ||
|
||
val config : learnocaml_config Js.t | ||
val api_server : string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters