packages feed

servant-static-th 0.1.0.0 → 0.1.0.1

raw patch · 5 files changed

+27/−27 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

servant-static-th.cabal view
@@ -1,5 +1,5 @@ name:                servant-static-th-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Embed a directory of static files in your application and serve them from your Servant server description:         Please see <https://github.com/cdepillabout/servant-static-th#readme README.md>. homepage:            https://github.com/cdepillabout/servant-static-th
src/Servant/Static/TH.hs view
@@ -18,18 +18,18 @@ Haskell web API that looks like this:  @-  $ tree dir/-  dir/+  $ tree dir\/+  dir\/   ├── js   │   └── test.js   └── hello.html @ -Here's the contents of @\"hello.html\"@ and @\"js/test.js\"@:+Here's the contents of @\"hello.html\"@ and @\"js\/test.js\"@:  @-  $ cat dir/index.html-  \<p\>Hello World\</p\>+  $ cat dir\/index.html+  \<p\>Hello World\<\/p\>   $ cat dir\/js\/test.js   console.log(\"hello world\"); @@@ -66,16 +66,16 @@   frontEndServer :: 'Applicative' m => 'Servant.Server.ServerT' FrontEndAPI m   frontEndServer =          'pure' "console.log(\\"hello world\\");"-    ':<|>' 'pure' "\<p\>Hello World\</p\>"+    ':<|>' 'pure' "\<p\>Hello World\<\/p\>" @  If this WAI application is running, it is possible to use @curl@ to access the server:  @-  $ curl localhost:8080/hello.html-  \<p\>Hello World\</p\>-  $ curl localhost:8080/js/test.js+  $ curl localhost:8080\/hello.html+  \<p\>Hello World\<\/p\>+  $ curl localhost:8080\/js\/test.js   console.log(\"hello world\"); @ @@ -98,9 +98,9 @@   , createServerDec     -- * Create Both API and Server   , createApiAndServerDecs-    -- * Mime Types+    -- * MIME Types -    -- | The following types are the mime types supported by servant-static-th.+    -- | The following types are the MIME types supported by servant-static-th.     -- If you need additional MIME types supported, feel free to create an     -- <https://github.com/cdepillabout/servant-static-th/issues issue> or     -- <https://github.com/cdepillabout/servant-static-th/pulls PR>.@@ -146,7 +146,7 @@ -- Hard-coded Frontend file paths -- ------------------------------------ --- | This is the directory @\"frontend/dist\"@.+-- | This is the directory @\"frontend\/dist\"@. frontEndTemplateDir :: FilePath frontEndTemplateDir = "frontend" </> "dist" 
src/Servant/Static/TH/Internal/Api.hs view
@@ -45,8 +45,8 @@ -- For example, assume the following directory structure: -- -- @---   $ tree dir/---   dir/+--   $ tree dir\/+--   dir\/ --   ├── js --   │   └── test.js --   └── index.html
src/Servant/Static/TH/Internal/Mime.hs view
@@ -116,7 +116,7 @@  data CSS deriving Typeable --- | @text/css@+-- | @text\/css@ instance Accept CSS where   contentType :: Proxy CSS -> MediaType   contentType _ = "text" // "css"@@ -129,7 +129,7 @@  data GIF deriving Typeable --- | @image/gif@+-- | @image\/gif@ instance Accept GIF where   contentType :: Proxy GIF -> MediaType   contentType _ = "image" // "gif"@@ -142,7 +142,7 @@  data JPEG deriving Typeable --- | @image/jpeg@+-- | @image\/jpeg@ instance Accept JPEG where   contentType :: Proxy JPEG -> MediaType   contentType _ = "image" // "jpeg"@@ -155,7 +155,7 @@  data JS deriving Typeable --- | @application/javascript@+-- | @application\/javascript@ instance Accept JS where   contentType :: Proxy JS -> MediaType   contentType _ = "application" // "javascript"@@ -168,7 +168,7 @@  data PNG deriving Typeable --- | @image/png@+-- | @image\/png@ instance Accept PNG where   contentType :: Proxy PNG -> MediaType   contentType _ = "image" // "png"@@ -181,7 +181,7 @@  data SVG deriving Typeable --- | @image/svg@+-- | @image\/svg@ instance Accept SVG where   contentType :: Proxy SVG -> MediaType   contentType _ = "image" // "svg"@@ -194,7 +194,7 @@  data TXT deriving Typeable --- | @text/plain@+-- | @text\/plain@ instance Accept TXT where   contentType :: Proxy TXT -> MediaType   contentType _ = "text" // "plain"
src/Servant/Static/TH/Internal/Server.hs view
@@ -41,16 +41,16 @@ -- For example, assume the following directory structure and file contents: -- -- @---   $ tree dir/---   dir/+--   $ tree dir\/+--   dir\/ --   ├── js --   │   └── test.js --   └── index.html -- @ -- -- @---   $ cat dir/index.html---   \<p\>Hello World\</p\>+--   $ cat dir\/index.html+--   \<p\>Hello World\<\/p\> --   $ cat dir\/js\/test.js --   console.log(\"hello world\"); -- @@@ -78,7 +78,7 @@ --   frontEndServer :: 'Applicative' m => 'ServerT' FrontEndAPI m --   frontEndServer = --          'pure' "console.log(\\"hello world\\");"---     ':<|>' 'pure' "\<p\>Hello World\</p\>"+--     ':<|>' 'pure' "\<p\>Hello World\<\/p\>" -- @ createServerExp   :: FilePath