use staticDevel in scaffold
This commit is contained in:
parent
1b8c016557
commit
2adc337fa1
@ -25,6 +25,7 @@ module Yesod.Static
|
|||||||
, StaticRoute (..)
|
, StaticRoute (..)
|
||||||
-- * Smart constructor
|
-- * Smart constructor
|
||||||
, static
|
, static
|
||||||
|
, staticDevel
|
||||||
, embed
|
, embed
|
||||||
-- * Template Haskell helpers
|
-- * Template Haskell helpers
|
||||||
, staticFiles
|
, staticFiles
|
||||||
|
|||||||
@ -61,7 +61,11 @@ with~sitearg~ conf logger f = do
|
|||||||
takeMVar flag
|
takeMVar flag
|
||||||
#endif
|
#endif
|
||||||
where
|
where
|
||||||
|
#ifdef PRODUCTION
|
||||||
s = static Settings.staticDir
|
s = static Settings.staticDir
|
||||||
|
#else
|
||||||
|
s = staticDevel Settings.staticDir
|
||||||
|
#endif
|
||||||
|
|
||||||
-- for yesod devel
|
-- for yesod devel
|
||||||
withDevelAppPort :: Dynamic
|
withDevelAppPort :: Dynamic
|
||||||
|
|||||||
@ -40,7 +40,11 @@ with~sitearg~ conf logger f = do
|
|||||||
let h = ~sitearg~ conf logger s
|
let h = ~sitearg~ conf logger s
|
||||||
toWaiApp h >>= f
|
toWaiApp h >>= f
|
||||||
where
|
where
|
||||||
|
#ifdef PRODUCTION
|
||||||
s = static Settings.staticDir
|
s = static Settings.staticDir
|
||||||
|
#else
|
||||||
|
s = staticDevel Settings.staticDir
|
||||||
|
#endif
|
||||||
|
|
||||||
with~sitearg~LoadConfig :: Settings.AppEnvironment -> (Application -> IO a) -> IO a
|
with~sitearg~LoadConfig :: Settings.AppEnvironment -> (Application -> IO a) -> IO a
|
||||||
with~sitearg~LoadConfig env f = do
|
with~sitearg~LoadConfig env f = do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user