on master help sign in
executable-config: s/exe-config/config/
commiteec9bd07ec32e0cfc2a547404a9917fe38bfd7e0 authorLuigy Leon <luigy@outlook.com> dateTue 15 May 2018, 21:38 (8 years ago) parent0f16376
3 files changed+5−5
lib/executable-config/README.md+3−3 lib/executable-config/inject/src/Obelisk/ExecutableConfig/Inject.hs+1−1 lib/executable-config/lookup/src/Obelisk/ExecutableConfig.hs+1−1
lib/executable-config/README.md+3−3
@@ -9,7 +9,7 @@ Obelisk.ExecutableConfig serves two related purposes:
99
1010## File Location
1111
12−ExecutableConfig expects your configuration files to be placed in `./exe-config`.
12+ExecutableConfig expects your configuration files to be placed in `./config`.
1313
1414## Supported Platforms
1515
@@ -28,7 +28,7 @@ ExecutableConfig expects your configuration files to be placed in `./exe-config`
2828
2929There is currently no `inject` function for `jsaddle-warp`-based frontends.
3030
31−`get` is a Haskell function that simply reads the configuration files from `./exe-config`.
31+`get` is a Haskell function that simply reads the configuration files from `./config`.
3232
3333### Web backend + GHCJS
3434
@@ -36,7 +36,7 @@ There is currently no `inject` function for `jsaddle-warp`-based frontends.
3636
3737`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).
3838
39−`get` is a Haskell function that reads the configuration files from `./exe-config`.
39+`get` is a Haskell function that reads the configuration files from `./config`.
4040
4141#### GHCJS
4242
lib/executable-config/inject/src/Obelisk/ExecutableConfig/Inject.hs+1−1
@@ -11,7 +11,7 @@ import System.FilePath ((</>))
1111
1212inject :: FilePath -> IO ByteString
1313inject item = do
14− f <- BS.readFile $ "exe-config" </> item
14+ f <- BS.readFile $ "config" </> item
1515 fmap snd $ renderStatic $
1616 elAttr "script" ("type" =: "text/plain" <> "id" =: ("config-" <> T.pack item)) $
1717 text $ T.decodeUtf8 f
lib/executable-config/lookup/src/Obelisk/ExecutableConfig.hs+1−1
@@ -10,4 +10,4 @@ import System.IO.Error
1010get :: Text -> IO (Maybe Text)
1111get path = do
1212 let doesNotExist = \e -> if isDoesNotExistError e then Just () else Nothing
13− catchJust doesNotExist (fmap Just $ T.readFile $ "exe-config" </> T.unpack path) (\_ -> pure Nothing)
13+ catchJust doesNotExist (fmap Just $ T.readFile $ "config" </> T.unpack path) (\_ -> pure Nothing)