Fixed Hamlet version
This commit is contained in:
parent
888336029f
commit
d7dd2fd051
2
README
2
README
@ -1,3 +1 @@
|
|||||||
After installing, type "yesod init" to start a new project.
|
|
||||||
|
|
||||||
Learn more at http://docs.yesodweb.com/
|
Learn more at http://docs.yesodweb.com/
|
||||||
|
|||||||
@ -59,6 +59,7 @@ import Text.Cassius
|
|||||||
import Text.Julius
|
import Text.Julius
|
||||||
import Web.Routes
|
import Web.Routes
|
||||||
import qualified Data.JSON.Types as J
|
import qualified Data.JSON.Types as J
|
||||||
|
import Blaze.ByteString.Builder (toLazyByteString)
|
||||||
|
|
||||||
#if TEST
|
#if TEST
|
||||||
import Test.Framework (testGroup, Test)
|
import Test.Framework (testGroup, Test)
|
||||||
@ -408,10 +409,12 @@ widgetToPageContent (GWidget w) = do
|
|||||||
let scripts = map (locationToHamlet . unScript) $ runUniqueList scripts'
|
let scripts = map (locationToHamlet . unScript) $ runUniqueList scripts'
|
||||||
let stylesheets = map (locationToHamlet . unStylesheet)
|
let stylesheets = map (locationToHamlet . unStylesheet)
|
||||||
$ runUniqueList stylesheets'
|
$ runUniqueList stylesheets'
|
||||||
let cssToHtml (Css b) = Html b
|
-- FIXME change hamlet: cassius and julius should be structured datatypes so we don't need to do this
|
||||||
|
let unsafeLazyByteString = mconcat . map unsafeByteString . L.toChunks
|
||||||
|
let cssToHtml (Css b) = unsafeLazyByteString $ toLazyByteString b
|
||||||
celper :: Cassius url -> Hamlet url
|
celper :: Cassius url -> Hamlet url
|
||||||
celper = fmap cssToHtml
|
celper = fmap cssToHtml
|
||||||
jsToHtml (Javascript b) = Html b
|
jsToHtml (Javascript b) = unsafeLazyByteString $ toLazyByteString b
|
||||||
jelper :: Julius url -> Hamlet url
|
jelper :: Julius url -> Hamlet url
|
||||||
jelper = fmap jsToHtml
|
jelper = fmap jsToHtml
|
||||||
|
|
||||||
|
|||||||
@ -31,11 +31,10 @@ library
|
|||||||
, wai >= 0.3 && < 0.4
|
, wai >= 0.3 && < 0.4
|
||||||
, wai-extra >= 0.3 && < 0.4
|
, wai-extra >= 0.3 && < 0.4
|
||||||
, bytestring >= 0.9.1.4 && < 0.10
|
, bytestring >= 0.9.1.4 && < 0.10
|
||||||
, directory >= 1 && < 1.2
|
|
||||||
, text >= 0.5 && < 0.12
|
, text >= 0.5 && < 0.12
|
||||||
, template-haskell
|
, template-haskell
|
||||||
, web-routes-quasi >= 0.6.2 && < 0.7
|
, web-routes-quasi >= 0.6.2 && < 0.7
|
||||||
, hamlet >= 0.6 && < 0.7
|
, hamlet >= 0.7 && < 0.8
|
||||||
, blaze-builder >= 0.2.1 && < 0.3
|
, blaze-builder >= 0.2.1 && < 0.3
|
||||||
, transformers >= 0.2 && < 0.3
|
, transformers >= 0.2 && < 0.3
|
||||||
, clientsession >= 0.4.0 && < 0.5
|
, clientsession >= 0.4.0 && < 0.5
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user