@@ -0,0 +1,44 @@
1+# Obelisk.ExecutableConfig
2+
3+## About
4+
5+Obelisk.ExecutableConfig serves two related purposes:
6+
7+1. Injection: a cross-platform injection function, which can be used to put configuration files in a canonical location.
8+2. Retrieval: a cross-platform retrieval function that is aware of the canonical location on each platform and how to read files from that location.
9+
10+## File Location
11+
12+ExecutableConfig expects your configuration files to be placed in `./exe-config`.
13+
14+## Supported Platforms
15+
16+| Function | iOS | Android | Warp |Web backend + GHCJS |
17+|----------|:---:|:-------:|:----:|:------------------:|
18+| inject | ✔ | ✔ | | ✔ |
19+| get | ✔ | ✔ | ✔ | ✔ |
20+
21+### iOS and Android
22+
23+`inject` is a Nix function that copies the specified configuration folder to a canonical location on the device.
24+
25+`get` is a Haskell function that retrieves configuration files from the canonical location.
26+
27+### Warp
28+
29+There is currently no `inject` function for `jsaddle-warp`-based frontends.
30+
31+`get` is a Haskell function that simply reads the configuration files from `./exe-config`.
32+
33+### Web backend + GHCJS
34+
35+#### Backend
36+
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).
38+
39+`get` is a Haskell function that reads the configuration files from `./exe-config`.
40+
41+#### GHCJS
42+
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.
44+