on master help sign in
Add cabal flag for inotify
5abc3d8Jasper Van der Jeugt
hakyll.cabal+17−4
@@ -1,5 +1,5 @@
1Name: hakyll
1Name: hakyll
2−Version: 2.4.1
2+Version: 3.0.0.0
3
3
4Synopsis: A simple static site generator library.
4Synopsis: A simple static site generator library.
5Description: A simple static site generator library, mainly aimed at
5Description: A simple static site generator library, mainly aimed at
@@ -24,9 +24,20 @@ source-repository head
24 type: git
24 type: git
25 location: git://github.com/jaspervdj/Hakyll.git
25 location: git://github.com/jaspervdj/Hakyll.git
26
26
27+flag inotify
28+ description: Use the inotify bindings for the preview server. Better, but
29+ only works on Linux.
30+ default: False
31+
27library
32library
28 ghc-options: -Wall
33 ghc-options: -Wall
29 hs-source-dirs: src
34 hs-source-dirs: src
35+
36+ if flag(inotify)
37+ hs-source-dirs: src-inotify
38+ else
39+ hs-source-dirs: src-interval
40+
30 build-depends: base >= 4 && < 5,
41 build-depends: base >= 4 && < 5,
31 filepath == 1.*,
42 filepath == 1.*,
32 directory == 1.*,
43 directory == 1.*,
@@ -47,12 +58,14 @@ library
47 utf8-string >= 0.3,
58 utf8-string >= 0.3,
48 hinotify >= 0.3,
59 hinotify >= 0.3,
49 tagsoup >= 0.12,
60 tagsoup >= 0.12,
50− hopenssl >= 1.4
61+ hopenssl >= 1.4,
62+ unix >= 2.4,
63+ strict-concurrency >= 0.2
51 exposed-modules: Hakyll
64 exposed-modules: Hakyll
52 Hakyll.Main
65 Hakyll.Main
53 Hakyll.Web.Util.String
66 Hakyll.Web.Util.String
54 Hakyll.Web.Preview.Server
67 Hakyll.Web.Preview.Server
55− Hakyll.Web.Preview.INotify
68+ Hakyll.Web.Preview.Poll
56 Hakyll.Web.CompressCss
69 Hakyll.Web.CompressCss
57 Hakyll.Web.Template
70 Hakyll.Web.Template
58 Hakyll.Web.Feed
71 Hakyll.Web.Feed
@@ -64,10 +77,10 @@ library
64 Hakyll.Web.RelativizeUrls
77 Hakyll.Web.RelativizeUrls
65 Hakyll.Web.Page.Read
78 Hakyll.Web.Page.Read
66 Hakyll.Web.Page.Metadata
79 Hakyll.Web.Page.Metadata
67− Hakyll.Web
68 Hakyll.Core.ResourceProvider.FileResourceProvider
80 Hakyll.Core.ResourceProvider.FileResourceProvider
69 Hakyll.Core.Configuration
81 Hakyll.Core.Configuration
70 Hakyll.Core.Identifier.Pattern
82 Hakyll.Core.Identifier.Pattern
83+ Hakyll.Core.UnixFilter
71 Hakyll.Core.Util.Arrow
84 Hakyll.Core.Util.Arrow
72 Hakyll.Core.Util.File
85 Hakyll.Core.Util.File
73 Hakyll.Core.ResourceProvider
86 Hakyll.Core.ResourceProvider
src/Hakyll/Web/Preview/INotify.hs → src-inotify/Hakyll/Web/Preview/Poll.hsrenamed+1−1
@@ -1,6 +1,6 @@
1-- | Filesystem polling with an inotify backend. Works only on linux.
1-- | Filesystem polling with an inotify backend. Works only on linux.
2--
2--
3−module Hakyll.Web.Preview.INotify
3+module Hakyll.Web.Preview.Poll
4 ( previewPoll
4 ( previewPoll
5 ) where
5 ) where
6
6
src/Hakyll/Web/Preview/Interval.hs → src-interval/Hakyll/Web/Preview/Poll.hsrenamed+1−1
@@ -1,7 +1,7 @@
1-- | Interval-based implementation of preview polling, for the platforms which
1-- | Interval-based implementation of preview polling, for the platforms which
2-- are not supported by inotify.
2-- are not supported by inotify.
3--
3--
4−module Hakyll.Web.Preview.Interval
4+module Hakyll.Web.Preview.Poll
5 ( previewPoll
5 ( previewPoll
6 ) where
6 ) where
7
7
src/Hakyll/Main.hs+1−1
@@ -14,7 +14,7 @@ import Hakyll.Core.Configuration
14import Hakyll.Core.Run
14import Hakyll.Core.Run
15import Hakyll.Core.Rules
15import Hakyll.Core.Rules
16import Hakyll.Core.Rules.Internal
16import Hakyll.Core.Rules.Internal
17−import Hakyll.Web.Preview.INotify
17+import Hakyll.Web.Preview.Poll
18import Hakyll.Web.Preview.Server
18import Hakyll.Web.Preview.Server
19
19
20-- | This usualy is the function with which the user runs the hakyll compiler
20-- | This usualy is the function with which the user runs the hakyll compiler