Scaffolding works

This commit is contained in:
Michael Snoyman 2012-07-02 17:32:36 +03:00
parent ceecbb7301
commit 4fbfca050e
4 changed files with 33 additions and 20 deletions

View File

@ -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

View File

@ -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)

View File

@ -1,3 +1,4 @@
$newline never
\<!doctype html>
\<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
\<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->

View File

@ -13,7 +13,7 @@ import Application (makeFoundation)
import HomeTest
main :: IO a
main :: IO ()
main = do
conf <- loadConfig $ (configSettings Testing) { csParseExtra = parseExtra }
logger <- defaultDevelopmentLogger