on 3caa3db help sign in
44 lines 1.6 kB history raw
1# Obelisk.ExecutableConfig
3## About
5Obelisk.ExecutableConfig serves two related purposes:
71. Injection: a cross-platform injection function, which can be used to put configuration files in a canonical location.
82. Retrieval: a cross-platform retrieval function that is aware of the canonical location on each platform and how to read files from that location.
10## File Location
12ExecutableConfig expects your configuration files to be placed in `./config`.
14## Supported Platforms
16| Function | iOS | Android | Warp |Web backend + GHCJS |
17|----------|:---:|:-------:|:----:|:------------------:|
18| inject | ✔ | ✔ | | ✔ |
19| get | ✔ | ✔ | ✔ | ✔ |
21### iOS and Android
23`inject` is a Nix function that copies the specified configuration folder to a canonical location on the device.
25`get` is a Haskell function that retrieves configuration files from the canonical location.
27### Warp
29There is currently no `inject` function for `jsaddle-warp`-based frontends.
31`get` is a Haskell function that simply reads the configuration files from `./config`.
33### Web backend + GHCJS
35#### Backend
37`inject` is a Haskell function that produces a snippet of HTML that must be appended to the `<head>` of the page that the backend serves (i.e., the entry point for the GHCJS application).
39`get` is a Haskell function that reads the configuration files from `./config`.
41#### GHCJS
43`get` is a Haskell function that can be run by the GHCJS frontend to retrieve the injected configuration data from the served `<head>`. There is no `inject` that is run in GHCJS.