use staticDevel in scaffold

This commit is contained in:
Greg Weber 2011-08-22 20:30:16 -07:00
parent 1b8c016557
commit 2adc337fa1
3 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,7 @@ module Yesod.Static
, StaticRoute (..)
-- * Smart constructor
, static
, staticDevel
, embed
-- * Template Haskell helpers
, staticFiles

View File

@ -61,7 +61,11 @@ with~sitearg~ conf logger f = do
takeMVar flag
#endif
where
#ifdef PRODUCTION
s = static Settings.staticDir
#else
s = staticDevel Settings.staticDir
#endif
-- for yesod devel
withDevelAppPort :: Dynamic

View File

@ -40,7 +40,11 @@ with~sitearg~ conf logger f = do
let h = ~sitearg~ conf logger s
toWaiApp h >>= f
where
#ifdef PRODUCTION
s = static Settings.staticDir
#else
s = staticDevel Settings.staticDir
#endif
with~sitearg~LoadConfig :: Settings.AppEnvironment -> (Application -> IO a) -> IO a
with~sitearg~LoadConfig env f = do