[Pkg-haskell-commits] darcs: haskell-hledger-web: Embed static content in hledger-web binary. closes: #668622.
Clint Adams
clint at debian.org
Sat Apr 21 17:02:14 UTC 2012
Sat Apr 21 17:02:02 UTC 2012 Clint Adams <clint at debian.org>
* Embed static content in hledger-web binary. closes: #668622.
Ignore-this: 669bff7fee6db9f23178d1433c1d48d3
M ./changelog +6
A ./patches/embed-static-content.diff
M ./patches/series +1
Sat Apr 21 17:02:02 UTC 2012 Clint Adams <clint at debian.org>
* Embed static content in hledger-web binary. closes: #668622.
Ignore-this: 669bff7fee6db9f23178d1433c1d48d3
diff -rN -u old-haskell-hledger-web//changelog new-haskell-hledger-web//changelog
--- old-haskell-hledger-web//changelog 2012-04-21 17:02:13.799249379 +0000
+++ new-haskell-hledger-web//changelog 2012-04-21 17:02:13.799249379 +0000
@@ -1,3 +1,9 @@
+haskell-hledger-web (0.17.2~0307-2) unstable; urgency=low
+
+ * Embed static content in hledger-web binary. closes: #668622.
+
+ -- Clint Adams <clint at debian.org> Sat, 21 Apr 2012 12:18:56 -0400
+
haskell-hledger-web (0.17.2~0307-1) unstable; urgency=low
* New upstream darcs snapshot.
diff -rN -u old-haskell-hledger-web//patches/embed-static-content.diff new-haskell-hledger-web//patches/embed-static-content.diff
--- old-haskell-hledger-web//patches/embed-static-content.diff 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hledger-web//patches/embed-static-content.diff 2012-04-21 17:02:13.803249062 +0000
@@ -0,0 +1,28 @@
+--- a/Hledger/Web/Settings/StaticFiles.hs
++++ b/Hledger/Web/Settings/StaticFiles.hs
+@@ -11,19 +11,22 @@
+ -}
+ module Hledger.Web.Settings.StaticFiles where
+
+-import Prelude (IO)
++import System.IO
+ import Yesod.Static
+ import qualified Yesod.Static as Static
+
++import Prelude
+ import Hledger.Web.Settings (staticDir)
+
+ -- | use this to create your static file serving site
+ staticSite :: IO Static.Static
+-staticSite =
++staticSite = do
+ #ifdef DEVELOPMENT
++ putStrLn ("using web files from: " ++ staticDir ++ "/") >> hFlush stdout
+ Static.staticDevel staticDir
+ #else
+- Static.static staticDir
++ putStrLn "using embedded web files" >> hFlush stdout
++ return $(Static.embed staticDir)
+ #endif
+
+ -- | This generates easy references to files in the static directory at compile time,
diff -rN -u old-haskell-hledger-web//patches/series new-haskell-hledger-web//patches/series
--- old-haskell-hledger-web//patches/series 2012-04-21 17:02:13.775248542 +0000
+++ new-haskell-hledger-web//patches/series 2012-04-21 17:02:13.803249062 +0000
@@ -1 +1,2 @@
use-unminified-excanvas.diff
+embed-static-content.diff
More information about the Pkg-haskell-commits
mailing list