diff options
author | Eduardo Julian | 2020-10-03 20:13:27 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-10-03 20:13:27 -0400 |
commit | 2d16bdfa2854d851034eff9f042863dcceb8664a (patch) | |
tree | a1c593916c6ec9d6e9c132e641fc8b34b85a07f8 /stdlib/source/program/aedifex/command/auto.lux | |
parent | 618b1ce9743bb79f1ae3375b05a394a4183b21e8 (diff) |
Gave Aedifex support for multiple profiles.
Diffstat (limited to 'stdlib/source/program/aedifex/command/auto.lux')
-rw-r--r-- | stdlib/source/program/aedifex/command/auto.lux | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 5bf759a06..cbb76edbb 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -11,12 +11,13 @@ [data [collection ["." array] - ["." list]]] + ["." list] + ["." set]]] [world [file (#+ Path)]]] ["." // #_ ["/#" // #_ - ["#" project] + ["#" profile] ["#." action (#+ Action)] ["#." command (#+ Command)]]]) @@ -115,17 +116,18 @@ #.None (wrap [])))) -(def: #export (do! command project) +(def: #export (do! command profile) (All [a] (-> (Command a) (Command Any))) (do {@ ///action.monad} [#let [fs (java/nio/file/FileSystems::getDefault)] watcher (promise.future (java/nio/file/FileSystem::newWatchService fs)) - targets (|> project + targets (|> profile (get@ #///.sources) + set.to-list (monad.map @ ..targets) (:: @ map list.concat)) _ (monad.map @ (..watch! watcher) targets) - _ (command project)] + _ (command profile)] (loop [_ []] (do @ [?key (..poll! watcher) @@ -133,7 +135,7 @@ (#.Some key) (do @ [_ (promise.future (..drain! watcher)) - _ (command project)] + _ (command profile)] (wrap [])) #.None |