diff --git a/Yesod.hs b/Yesod.hs index ef68df43..c82e5c50 100644 --- a/Yesod.hs +++ b/Yesod.hs @@ -15,7 +15,9 @@ module Yesod -- * Running your application , warp , warpDebug +#if !PRODUCTION , develServer +#endif -- * Commonly referenced functions/datatypes , Application , lift @@ -60,7 +62,7 @@ import Yesod.Json import Yesod.Persist import Network.Wai (Application) import Network.Wai.Middleware.Debug -#if !GHC7 +#if !GHC7 && !PRODUCTION import Network.Wai.Handler.DevelServer (runQuit) #endif import Control.Monad.Trans.Class (lift) @@ -97,6 +99,7 @@ warpDebug port a = do hPutStrLn stderr $ "Application launched, listening on port " ++ show port toWaiApp a >>= run port . debug +#if !PRODUCTION -- | Run a development server, where your code changes are automatically -- reloaded. develServer :: Int -- ^ port number @@ -115,6 +118,7 @@ develServer port modu func = do ] runQuit port modu func determineHamletDeps #endif +#endif data TempType = Hamlet | Cassius | Julius | Widget deriving Show diff --git a/yesod.cabal b/yesod.cabal index 2cf68f7a..95b3741e 100644 --- a/yesod.cabal +++ b/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 0.7.0 +version: 0.7.0.1 license: BSD3 license-file: LICENSE author: Michael Snoyman @@ -18,13 +18,20 @@ extra-source-files: scaffold/*.cg flag ghc7 +flag production + Description: Skip the wai-handler-devel and hint dependencies. + Default: False + library if flag(ghc7) build-depends: base >= 4.3 && < 5 cpp-options: -DGHC7 else build-depends: base >= 4 && < 4.3 - , wai-handler-devel >= 0.2 && < 0.3 + if flag(production) + cpp-options: -DPRODUCTION + else + build-depends: wai-handler-devel >= 0.2 && < 0.3 build-depends: yesod-core >= 0.7 && < 0.8 , yesod-auth >= 0.3 && < 0.4 , yesod-json >= 0.0 && < 0.1