Added dependencies and some helper provision scripts.
authorsabadev <saba@sabadev.xyz>
Mon, 15 Mar 2021 22:19:53 +0000 (18:19 -0400)
committersabadev <dev@sabadev.xyz>
Tue, 13 Apr 2021 01:16:02 +0000 (21:16 -0400)
Vagrantfile
package.yaml
stack.yaml.lock [new file with mode: 0644]
website.cabal

index 6e90300..eec7552 100644 (file)
@@ -4,8 +4,23 @@ sudo apt-get install -y nginx certbot python-certbot-nginx
 stack --version || wget -qO- https://get.haskellstack.org/ | sh
 SCRIPT
 
+$build = <<-SCRIPT
+cd /vagrant
+sudo stack --allow-different-user build
+SCRIPT
+
+$test = <<-SCRIPT
+cd /vagrant
+sudo stack --allow-different-user test
+SCRIPT
+
+$run = <<-SCRIPT
+cd /vagrant
+sudo stack --allow-different-user exec website
+SCRIPT
+
 Vagrant.configure("2") do |config|
-  config.vm.box = "generic/debian10"
+  config.vm.box = "debian/buster64"
 
   config.vm.provider "virtualbox" do |vb|
     vb.gui = false
@@ -18,4 +33,7 @@ Vagrant.configure("2") do |config|
   config.vm.network "forwarded_port", guest: 80, host: 7000
   config.vm.provision "shell", inline: $script
 
+  config.vm.provision "build", type: "shell", run: "never", inline: $build
+  config.vm.provision "test", type: "shell", run: "never", inline: $test
+  config.vm.provision "run", type: "shell", run: "never", inline: $run
 end
index 379c79d..fb2140c 100644 (file)
@@ -20,13 +20,32 @@ extra-source-files:
 description:         Please see the README on GitHub at <https://github.com/githubuser/website#readme>
 
 dependencies:
+- aeson == 1.5.6.0
 - base >= 4.7 && < 5
+- bytestring == 0.10.12.0
+- cmark == 0.6
+- containers == 0.6.2.1
+- mtl == 2.2.2
+- servant == 0.18.2
+- servant-server == 0.18.2
+- text == 1.2.4.1
+- warp == 3.3.14
+
+default-extensions:
+- DataKinds
+- FlexibleContexts
+- FlexibleInstances
+- GADTs
+- KindSignatures
+- OverloadedStrings
+- StandaloneDeriving
+- TypeOperators
 
 library:
   source-dirs: src
 
 executables:
-  website-exe:
+  website:
     main:                Main.hs
     source-dirs:         app
     ghc-options:
@@ -46,3 +65,5 @@ tests:
     - -with-rtsopts=-N
     dependencies:
     - website
+    - hspec == 2.7.8
+    - QuickCheck == 2.14.2
diff --git a/stack.yaml.lock b/stack.yaml.lock
new file mode 100644 (file)
index 0000000..939ffa9
--- /dev/null
@@ -0,0 +1,13 @@
+# This file was autogenerated by Stack.
+# You should not edit this file by hand.
+# For more information, please see the documentation at:
+#   https://docs.haskellstack.org/en/stable/lock_files
+
+packages: []
+snapshots:
+- completed:
+    size: 565712
+    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/6.yaml
+    sha256: 4e5e581a709c88e3fe26a9ce8bf331435729bead762fb5c190064c6c5bb1b835
+  original:
+    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/6.yaml
index 9e695b5..2166596 100644 (file)
@@ -4,7 +4,7 @@ cabal-version: 1.12
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: d1ec5dfa4cc510cab138672ec3fb62adf28f1c0201375eda36d389cdd1377686
+-- hash: 5b56f25d1b124af245aaaa6eec2b43613e0fdc60999133b89b5d229692d84c2d
 
 name:           website
 version:        0.1.0.0
@@ -33,10 +33,19 @@ library
   hs-source-dirs:
       src
   build-depends:
-      base >=4.7 && <5
+      aeson ==1.5.6.0
+    , base >=4.7 && <5
+    , bytestring ==0.10.12.0
+    , containers ==0.6.2.1
+    , mtl ==2.2.2
+    , pandoc ==2.11.4
+    , servant ==0.18.2
+    , servant-server ==0.18.2
+    , text ==1.2.4.1
+    , warp ==3.3.14
   default-language: Haskell2010
 
-executable website-exe
+executable website
   main-is: Main.hs
   other-modules:
       Paths_website
@@ -44,7 +53,16 @@ executable website-exe
       app
   ghc-options: -threaded -rtsopts -with-rtsopts=-N
   build-depends:
-      base >=4.7 && <5
+      aeson ==1.5.6.0
+    , base >=4.7 && <5
+    , bytestring ==0.10.12.0
+    , containers ==0.6.2.1
+    , mtl ==2.2.2
+    , pandoc ==2.11.4
+    , servant ==0.18.2
+    , servant-server ==0.18.2
+    , text ==1.2.4.1
+    , warp ==3.3.14
     , website
   default-language: Haskell2010
 
@@ -57,6 +75,15 @@ test-suite website-test
       test
   ghc-options: -threaded -rtsopts -with-rtsopts=-N
   build-depends:
-      base >=4.7 && <5
+      aeson ==1.5.6.0
+    , base >=4.7 && <5
+    , bytestring ==0.10.12.0
+    , containers ==0.6.2.1
+    , mtl ==2.2.2
+    , pandoc ==2.11.4
+    , servant ==0.18.2
+    , servant-server ==0.18.2
+    , text ==1.2.4.1
+    , warp ==3.3.14
     , website
   default-language: Haskell2010