summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rw-r--r--stack.yaml15
2 files changed, 16 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 1029599..5c71a12 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
+PACKAGE="$(shell stack list-dependencies --separator='-' | grep hakyll)"
+LOCAL_DOC_ROOT="$(shell stack path --local-doc-root)"
+
# Generate the docs and copy them to the website dir
haddock:
- cabal haddock --hyperlink-source
- rm -rf web/reference/
- cp -r dist/doc/html/hakyll/ web/reference/
+ stack build --haddock --no-haddock-deps
+ rsync -r "$(LOCAL_DOC_ROOT)/$(PACKAGE)/" web/reference/
-# Run the tests
-test:
- runghc -isrc -itests tests/TestSuite.hs
+.PHONY: haddock
diff --git a/stack.yaml b/stack.yaml
index ce34f0e..2c6e536 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -3,11 +3,11 @@ extra-package-dbs: []
flags:
hakyll:
- previewServer: True
- watchServer: True
- checkExternal: True
- usePandoc: True
- buildWebsite: True
+ previewServer: true
+ watchServer: true
+ checkExternal: true
+ usePandoc: true
+ buildWebsite: true
packages:
- '.'
@@ -18,3 +18,8 @@ nix:
enable: false
packages:
- zlib
+
+build:
+ haddock: true
+ haddock-hyperlink-source: true
+ haddock-deps: false