Scaffolding works
This commit is contained in:
parent
ceecbb7301
commit
4fbfca050e
@ -17,11 +17,13 @@ import Text.Shakespeare.Text (st)
|
|||||||
import Language.Haskell.TH.Syntax
|
import Language.Haskell.TH.Syntax
|
||||||
import Database.Persist.~importPersist~ (~configPersist~)
|
import Database.Persist.~importPersist~ (~configPersist~)
|
||||||
import Yesod.Default.Config
|
import Yesod.Default.Config
|
||||||
import qualified Yesod.Default.Util
|
import Yesod.Default.Util
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Data.Yaml
|
import Data.Yaml
|
||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
import Settings.Development
|
import Settings.Development
|
||||||
|
import Data.Default (def)
|
||||||
|
import Text.Hamlet
|
||||||
|
|
||||||
-- | Which Persistent backend this site is using.
|
-- | Which Persistent backend this site is using.
|
||||||
type PersistConfig = ~configPersist~
|
type PersistConfig = ~configPersist~
|
||||||
@ -49,13 +51,22 @@ staticDir = "static"
|
|||||||
staticRoot :: AppConfig DefaultEnv x -> Text
|
staticRoot :: AppConfig DefaultEnv x -> Text
|
||||||
staticRoot conf = [st|#{appRoot conf}/static|]
|
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
|
-- The rest of this file contains settings which rarely need changing by a
|
||||||
-- user.
|
-- user.
|
||||||
|
|
||||||
widgetFile :: String -> Q Exp
|
widgetFile :: String -> Q Exp
|
||||||
widgetFile = if development then Yesod.Default.Util.widgetFileReload
|
widgetFile = (if development then widgetFileReload
|
||||||
else Yesod.Default.Util.widgetFileNoReload
|
else widgetFileNoReload)
|
||||||
|
widgetFileSettings
|
||||||
|
|
||||||
data Extra = Extra
|
data Extra = Extra
|
||||||
{ extraCopyright :: Text
|
{ extraCopyright :: Text
|
||||||
|
|||||||
@ -50,31 +50,32 @@ library
|
|||||||
NoMonomorphismRestriction
|
NoMonomorphismRestriction
|
||||||
|
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, yesod-platform >= 1.0 && < 1.1
|
-- , yesod-platform >= 1.1 && < 1.2
|
||||||
, yesod >= 1.0 && < 1.1
|
, yesod >= 1.1 && < 1.2
|
||||||
, yesod-core >= 1.0 && < 1.1
|
, yesod-core >= 1.1 && < 1.2
|
||||||
, yesod-auth >= 1.0 && < 1.1
|
, yesod-auth >= 1.1 && < 1.2
|
||||||
, yesod-static >= 1.0 && < 1.1
|
, yesod-static >= 1.1 && < 1.2
|
||||||
, yesod-default >= 1.0 && < 1.1
|
, yesod-default >= 1.1 && < 1.2
|
||||||
, yesod-form >= 1.0 && < 1.1
|
, yesod-form >= 1.1 && < 1.2
|
||||||
, yesod-test >= 0.2 && < 0.3
|
, yesod-test >= 0.3 && < 0.4
|
||||||
, clientsession >= 0.7.3 && < 0.8
|
, clientsession >= 0.8 && < 0.9
|
||||||
, bytestring >= 0.9 && < 0.10
|
, bytestring >= 0.9 && < 0.10
|
||||||
, text >= 0.11 && < 0.12
|
, text >= 0.11 && < 0.12
|
||||||
, persistent >= 0.9 && < 0.10
|
, persistent >= 1.0 && < 1.1
|
||||||
, persistent-~backendLower~ >= 0.9 && < 0.10
|
, persistent-~backendLower~ >= 1.0 && < 1.1
|
||||||
, template-haskell
|
, template-haskell
|
||||||
, hamlet >= 1.0 && < 1.1
|
, hamlet >= 1.1 && < 1.2
|
||||||
, shakespeare-css >= 1.0 && < 1.1
|
, shakespeare-css >= 1.0 && < 1.1
|
||||||
, shakespeare-js >= 1.0 && < 1.1
|
, shakespeare-js >= 1.0 && < 1.1
|
||||||
, shakespeare-text >= 1.0 && < 1.1
|
, shakespeare-text >= 1.0 && < 1.1
|
||||||
, hjsmin >= 0.1 && < 0.2
|
, hjsmin >= 0.1 && < 0.2
|
||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 0.4
|
||||||
, wai-extra >= 1.2 && < 1.3
|
, wai-extra >= 1.3 && < 1.4
|
||||||
, yaml >= 0.7 && < 0.8
|
, yaml >= 0.8 && < 0.9
|
||||||
, http-conduit >= 1.4 && < 1.5
|
, http-conduit >= 1.5 && < 1.6
|
||||||
, directory >= 1.1 && < 1.2
|
, directory >= 1.1 && < 1.2
|
||||||
, warp >= 1.2 && < 1.3
|
, warp >= 1.3 && < 1.4
|
||||||
|
, data-default
|
||||||
|
|
||||||
executable ~project~
|
executable ~project~
|
||||||
if flag(library-only)
|
if flag(library-only)
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
$newline never
|
||||||
\<!doctype html>
|
\<!doctype html>
|
||||||
\<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
|
\<!--[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]-->
|
\<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import Application (makeFoundation)
|
|||||||
|
|
||||||
import HomeTest
|
import HomeTest
|
||||||
|
|
||||||
main :: IO a
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
conf <- loadConfig $ (configSettings Testing) { csParseExtra = parseExtra }
|
conf <- loadConfig $ (configSettings Testing) { csParseExtra = parseExtra }
|
||||||
logger <- defaultDevelopmentLogger
|
logger <- defaultDevelopmentLogger
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user