packages feed

scotty-hastache 0.2.0 → 0.2.1

raw patch · 2 files changed

+4/−17 lines, 2 filesdep −blaze-htmldep −blaze-markupdep ~hastachedep ~scotty

Dependencies removed: blaze-html, blaze-markup

Dependency ranges changed: hastache, scotty

Files

scotty-hastache.cabal view
@@ -1,5 +1,5 @@ name:                scotty-hastache-version:             0.2.0+version:             0.2.1 homepage:            https://github.com/scotty-web/scotty-hastache bug-reports:	     https://github.com/scotty-web/scotty-hastache/issues synopsis:            Easy Mustache templating support for Scotty@@ -29,14 +29,12 @@ library   exposed-modules:     Web.Scotty.Hastache   build-depends:       base            >= 4.4 && < 5,-                       blaze-html      >= 0.6.0.0,-                       blaze-markup    >= 0.5.1.0,                        containers      >= 0.5.0.0,                        filepath        >= 1.3.0.0,-                       hastache        >= 0.5.0,+                       hastache        >= 0.6.0,                        http-types      >= 0.7.3.0.1,                        mtl             >= 2.1.2,-                       scotty          >= 0.6,+                       scotty          >= 0.7,                        text            >= 0.11.3.1,                        wai             >= 1.3.0.1,                        warp            >= 1.3.4.1
src/Web/Scotty/Hastache.hs view
@@ -53,9 +53,6 @@ import           Network.Wai                     (Application, Response) import           Network.Wai.Handler.Warp        (Port) import           System.FilePath.Posix           ((</>))-import           Text.Blaze.Html.Renderer.String as BRS-import           Text.Blaze.Html.Renderer.Utf8   as BRU-import           Text.Blaze.Internal             (Markup) import           Text.Hastache import           Text.Hastache.Context @@ -134,13 +131,12 @@ hastache :: ScottyError e => FilePath -> ActionH e () hastache tpl = do   ((conf :: MuConfig IO), tmap) <- lift State.get-  setHeader "Content-Type" "text/html"   let cntx a  = fromMaybe MuNothing (M.lookup a tmap)   let tplFile = fromMaybe "." (muTemplateFileDir conf)               </> tpl               ++ fromMaybe "" (muTemplateFileExt conf)   res <- liftIO $ hastacheFile conf tplFile (mkStrContext cntx)-  raw res+  html res  -- | Set the value of a mustache variable. setH :: ScottyError e => String -> MuType IO -> ActionH e ()@@ -169,12 +165,5 @@ scottyHApp conf defs = do     (runH, runActionToIO) <- mkHStateRunners conf     scottyAppT runH runActionToIO defs--instance Show Markup where-  show = BRS.renderHtml--instance MuVar Markup where-  isEmpty = isEmpty . BRU.renderHtml-  toLByteString = BRU.renderHtml