2024-09-11 22:32:14 +02:00
|
|
|
module Main where
|
|
|
|
|
2024-10-30 21:53:57 +01:00
|
|
|
import Types (Dependency)
|
|
|
|
import qualified DependencyRunner as DR
|
|
|
|
import qualified Types.Dependency as D
|
|
|
|
import SiteGenerator (generateSite)
|
|
|
|
import DependencyGenerator (evalDepGenM)
|
2024-09-21 16:35:13 +02:00
|
|
|
|
2024-09-27 21:18:29 +02:00
|
|
|
import System.Environment (getArgs)
|
2024-10-30 21:53:57 +01:00
|
|
|
import qualified Data.Text.IO as T
|
|
|
|
|
|
|
|
dependencies :: [Dependency]
|
|
|
|
dependencies = evalDepGenM generateSite
|
2024-09-21 16:35:13 +02:00
|
|
|
|
2024-09-11 22:32:14 +02:00
|
|
|
main :: IO ()
|
2024-09-27 21:18:29 +02:00
|
|
|
main = do
|
|
|
|
args <- getArgs
|
|
|
|
case args of
|
|
|
|
["run"] ->
|
2024-10-30 21:53:57 +01:00
|
|
|
DR.runDepRunMIO $ DR.runDeps dependencies
|
2024-09-27 21:18:29 +02:00
|
|
|
["tree"] ->
|
2024-10-30 21:53:57 +01:00
|
|
|
T.putStr $ D.formatDependencyTrees dependencies
|
2024-09-27 21:18:29 +02:00
|
|
|
_ ->
|
|
|
|
error "unexpected arguments"
|