在lein中运行多个异步任务

时间:2016-07-16 21:46:00

标签: clojure clojurescript leiningen

我有以下别名

:aliases {
        "start-server" ["do" ["ring" "server-headless"]]
        "build-site" ["run" "-m" "cjohansen-no.web/export"]
        "build-html" ["run" "-m" "cjohansen-no.web/export-pages"]
        "build-prod" ["do" ["build-site"] ["cljsbuild" "once" "prod"]]
        "build-js"   ["do" ["cljsbuild" "auto" "dev" ]]
        "watch-stuff" [ "do" ["start-server"] ["auto" "build-html"]]
        "build-dev" ["do" ["build-site"] ["build-js"]  "watch-stuff" ]
            }

出于某种原因,我无法运行" build-dev"没有它停在" build-js"如何在前一个任务中并行运行这些任务?

1 个答案:

答案 0 :(得分:6)

lein do按顺序运行,要并行运行,您可以使用lein pdo代替。