DEV -> DEVELOPMENT
This commit is contained in:
parent
0f72117e53
commit
157d098da2
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user