on master help sign in
Cabalize website
commitc29b344ceba1214548a194d885a1d3f2e819784e authorJasper Van der Jeugt <jaspervdj@gmail.com> dateThu 21 Dec 2017, 15:23 (9 years ago) parentd011b17
4 files changed+39−12
.circleci/config.yml+1−1 .circleci/tickle.sh+1−1 hakyll.cabal+36−10 stack.yaml+1
.circleci/config.yml+1−1
@@ -14,7 +14,7 @@ jobs:
1414 # We set jobs to 1 here because that prevents Out-Of-Memory exceptions
1515 # while compiling dependencies.
1616 name: 'Install dependencies'
17− command: '.circleci/tickle.sh cabal install --only-dependencies --enable-tests --jobs=1'
17+ command: '.circleci/tickle.sh cabal install --only-dependencies --enable-tests --jobs=1 --flags="+buildWebsite"'
1818 - run:
1919 name: 'Build and run tests'
2020 command: 'cabal test'
.circleci/tickle.sh+1−1
@@ -3,7 +3,7 @@ set -o nounset -o errexit -o pipefail
33
44function tickle() {
55 while [ true ]; do
6− echo "[$(date +%H:%M:%S)"] Tickling...
6+ echo "[$(date +%H:%M:%S)] Tickling..."
77 sleep 60
88 done
99}
hakyll.cabal+36−10
@@ -37,7 +37,7 @@ License: BSD3
3737License-File: LICENSE
3838Category: Web
3939
40−Cabal-Version: >= 1.8
40+Cabal-Version: >= 1.10
4141Build-Type: Simple
4242Data-Dir: data
4343
@@ -94,9 +94,15 @@ Flag checkExternal
9494 Description: Include external link checking
9595 Default: True
9696
97+Flag buildWebsite
98+ Description: Build the hakyll website
99+ Default: False
100+ Manual: True
101+
97102Library
98− Ghc-Options: -Wall
99− Hs-Source-Dirs: lib
103+ Ghc-Options: -Wall
104+ Hs-Source-Dirs: lib
105+ Default-language: Haskell2010
100106
101107 Exposed-Modules:
102108 Hakyll
@@ -217,10 +223,11 @@ Library
217223 -DCHECK_EXTERNAL
218224
219225Test-suite hakyll-tests
220− Type: exitcode-stdio-1.0
221− Hs-source-dirs: tests
222− Main-is: TestSuite.hs
223− Ghc-options: -Wall
226+ Type: exitcode-stdio-1.0
227+ Hs-source-dirs: tests
228+ Main-is: TestSuite.hs
229+ Ghc-options: -Wall
230+ Default-language: Haskell2010
224231
225232 Other-modules:
226233 Hakyll.Core.Dependencies.Tests
@@ -307,9 +314,10 @@ Test-suite hakyll-tests
307314 -DCHECK_EXTERNAL
308315
309316Executable hakyll-init
310− Ghc-options: -Wall
311− Hs-source-dirs: src
312− Main-is: Init.hs
317+ Main-is: Init.hs
318+ Ghc-options: -Wall
319+ Hs-source-dirs: src
320+ Default-language: Haskell2010
313321
314322 Other-modules:
315323 Paths_hakyll
@@ -319,3 +327,21 @@ Executable hakyll-init
319327 base >= 4 && < 5,
320328 directory >= 1.0 && < 1.4,
321329 filepath >= 1.0 && < 1.5
330+
331+Executable hakyll-website
332+ Main-is: site.hs
333+ Ghc-options: -Wall
334+ Hs-source-dirs: web
335+ Default-language: Haskell2010
336+
337+ If flag(buildWebsite)
338+ Buildable: True
339+ Else
340+ Buildable: False
341+
342+ Build-depends:
343+ hakyll,
344+ base >= 4 && < 5,
345+ directory >= 1.0 && < 1.4,
346+ filepath >= 1.0 && < 1.5,
347+ pandoc >= 2.0.5 && < 2.1
stack.yaml+1
@@ -6,6 +6,7 @@ flags:
66 previewServer: True
77 watchServer: True
88 checkExternal: True
9+ buildWebsite: True
910
1011packages:
1112 - '.'