diff --git a/yesod/scaffold/Settings.hs.cg b/yesod/scaffold/Settings.hs.cg index 8a8af894..f6f76df8 100644 --- a/yesod/scaffold/Settings.hs.cg +++ b/yesod/scaffold/Settings.hs.cg @@ -17,11 +17,13 @@ import Text.Shakespeare.Text (st) import Language.Haskell.TH.Syntax import Database.Persist.~importPersist~ (~configPersist~) import Yesod.Default.Config -import qualified Yesod.Default.Util +import Yesod.Default.Util import Data.Text (Text) import Data.Yaml import Control.Applicative import Settings.Development +import Data.Default (def) +import Text.Hamlet -- | Which Persistent backend this site is using. type PersistConfig = ~configPersist~ @@ -49,13 +51,22 @@ staticDir = "static" staticRoot :: AppConfig DefaultEnv x -> Text staticRoot conf = [st|#{appRoot conf}/static|] +-- | Settings for 'widgetFile', such as which template languages to support and +-- default Hamlet settings. +widgetFileSettings :: WidgetFileSettings +widgetFileSettings = def + { wfsHamletSettings = defaultHamletSettings + { hamletNewlines = AlwaysNewlines + } + } -- The rest of this file contains settings which rarely need changing by a -- user. widgetFile :: String -> Q Exp -widgetFile = if development then Yesod.Default.Util.widgetFileReload - else Yesod.Default.Util.widgetFileNoReload +widgetFile = (if development then widgetFileReload + else widgetFileNoReload) + widgetFileSettings data Extra = Extra { extraCopyright :: Text diff --git a/yesod/scaffold/project.cabal.cg b/yesod/scaffold/project.cabal.cg index d2b6d4f2..77a43490 100644 --- a/yesod/scaffold/project.cabal.cg +++ b/yesod/scaffold/project.cabal.cg @@ -50,31 +50,32 @@ library NoMonomorphismRestriction build-depends: base >= 4 && < 5 - , yesod-platform >= 1.0 && < 1.1 - , yesod >= 1.0 && < 1.1 - , yesod-core >= 1.0 && < 1.1 - , yesod-auth >= 1.0 && < 1.1 - , yesod-static >= 1.0 && < 1.1 - , yesod-default >= 1.0 && < 1.1 - , yesod-form >= 1.0 && < 1.1 - , yesod-test >= 0.2 && < 0.3 - , clientsession >= 0.7.3 && < 0.8 + -- , yesod-platform >= 1.1 && < 1.2 + , yesod >= 1.1 && < 1.2 + , yesod-core >= 1.1 && < 1.2 + , yesod-auth >= 1.1 && < 1.2 + , yesod-static >= 1.1 && < 1.2 + , yesod-default >= 1.1 && < 1.2 + , yesod-form >= 1.1 && < 1.2 + , yesod-test >= 0.3 && < 0.4 + , clientsession >= 0.8 && < 0.9 , bytestring >= 0.9 && < 0.10 , text >= 0.11 && < 0.12 - , persistent >= 0.9 && < 0.10 - , persistent-~backendLower~ >= 0.9 && < 0.10 + , persistent >= 1.0 && < 1.1 + , persistent-~backendLower~ >= 1.0 && < 1.1 , template-haskell - , hamlet >= 1.0 && < 1.1 + , hamlet >= 1.1 && < 1.2 , shakespeare-css >= 1.0 && < 1.1 , shakespeare-js >= 1.0 && < 1.1 , shakespeare-text >= 1.0 && < 1.1 , hjsmin >= 0.1 && < 0.2 , monad-control >= 0.3 && < 0.4 - , wai-extra >= 1.2 && < 1.3 - , yaml >= 0.7 && < 0.8 - , http-conduit >= 1.4 && < 1.5 + , wai-extra >= 1.3 && < 1.4 + , yaml >= 0.8 && < 0.9 + , http-conduit >= 1.5 && < 1.6 , directory >= 1.1 && < 1.2 - , warp >= 1.2 && < 1.3 + , warp >= 1.3 && < 1.4 + , data-default executable ~project~ if flag(library-only) diff --git a/yesod/scaffold/templates/default-layout-wrapper.hamlet.cg b/yesod/scaffold/templates/default-layout-wrapper.hamlet.cg index 37a22d96..b222256c 100644 --- a/yesod/scaffold/templates/default-layout-wrapper.hamlet.cg +++ b/yesod/scaffold/templates/default-layout-wrapper.hamlet.cg @@ -1,3 +1,4 @@ +$newline never \ \ \ diff --git a/yesod/scaffold/tests/main.hs.cg b/yesod/scaffold/tests/main.hs.cg index d475fe8c..5821c4a5 100644 --- a/yesod/scaffold/tests/main.hs.cg +++ b/yesod/scaffold/tests/main.hs.cg @@ -13,7 +13,7 @@ import Application (makeFoundation) import HomeTest -main :: IO a +main :: IO () main = do conf <- loadConfig $ (configSettings Testing) { csParseExtra = parseExtra } logger <- defaultDevelopmentLogger