DEV -> DEVELOPMENT

This commit is contained in:
Michael Snoyman 2011-12-14 19:01:54 +02:00
parent 0f72117e53
commit 157d098da2
8 changed files with 12 additions and 12 deletions

View File

@ -29,7 +29,7 @@ mkYesodDispatch "~sitearg~" resources~sitearg~
-- migrations handled by Yesod.
with~sitearg~ :: AppConfig DefaultEnv () -> Logger -> (Application -> IO ()) -> IO ()
with~sitearg~ conf logger f = do
#ifdef DEV
#ifdef DEVELOPMENT
s <- staticDevel Settings.staticDir
#else
s <- static Settings.staticDir

View File

@ -33,7 +33,7 @@ import Model
import Text.Jasmine (minifym)
import Web.ClientSession (getKey)
import Text.Hamlet (hamletFile)
#if DEV
#if DEVELOPMENT
import qualified Data.Text.Lazy.Encoding
#else
import Network.Mail.Mime (sendmail)
@ -145,7 +145,7 @@ instance YesodAuth ~sitearg~ where
-- Sends off your mail. Requires sendmail in production!
deliver :: ~sitearg~ -> L.ByteString -> IO ()
#ifdef DEV
#ifdef DEVELOPMENT
deliver y = logLazyText (getLogger y) . Data.Text.Lazy.Encoding.decodeUtf8
#else
deliver _ = sendmail

View File

@ -49,7 +49,7 @@ staticRoot conf = [~qq~st|#{appRoot conf}/static|]
-- user.
widgetFile :: String -> Q Exp
#if DEV
#if DEVELOPMENT
widgetFile = Yesod.Default.Util.widgetFileReload
#else
widgetFile = Yesod.Default.Util.widgetFileNoReload

View File

@ -27,12 +27,12 @@
#
# * add code in Settings.hs to turn that url into connection parameters. The below works for Postgresql.
#
# #ifdef !DEV
# #ifdef !DEVELOPMENT
# import qualified Web.Heroku
# #endif
#
# dbConnParams :: AppEnvironment -> IO [(Text, Text)]
# #ifdef !DEV
# #ifdef !DEVELOPMENT
# dbConnParams _ = Web.Heroku.dbConnParams
# #else
# dbConnParams env = do

View File

@ -35,7 +35,7 @@ library
Handler.Root
ghc-options: -Wall -threaded -O0
cpp-options: -DDEV
cpp-options: -DDEVELOPMENT
extensions: TemplateHaskell
QuasiQuotes
@ -54,7 +54,7 @@ executable ~project~
Buildable: False
if flag(dev)
cpp-options: -DDEV
cpp-options: -DDEVELOPMENT
ghc-options: -Wall -threaded -O0
else
ghc-options: -Wall -threaded

View File

@ -28,7 +28,7 @@ mkYesodDispatch "~sitearg~" resources~sitearg~
-- migrations handled by Yesod.
with~sitearg~ :: AppConfig DefaultEnv () -> Logger -> (Application -> IO ()) -> IO ()
with~sitearg~ conf logger f = do
#ifdef DEV
#ifdef DEVELOPMENT
s <- staticDevel Settings.staticDir
#else
s <- static Settings.staticDir

View File

@ -38,7 +38,7 @@ staticRoot :: AppConfig DefaultEnv a -> Text
staticRoot conf = [~qq~st|#{appRoot conf}/static|]
widgetFile :: String -> Q Exp
#if DEV
#if DEVELOPMENT
widgetFile = Yesod.Default.Util.widgetFileReload
#else
widgetFile = Yesod.Default.Util.widgetFileNoReload

View File

@ -33,7 +33,7 @@ library
Handler.Root
ghc-options: -Wall -threaded -O0
cpp-options: -DDEV
cpp-options: -DDEVELOPMENT
extensions: TemplateHaskell
QuasiQuotes
@ -49,7 +49,7 @@ executable ~project~
Buildable: False
if flag(dev)
cpp-options: -DDEV
cpp-options: -DDEVELOPMENT
ghc-options: -Wall -threaded -O0
else
ghc-options: -Wall -threaded