Clojure前后构建钩子

时间:2016-07-13 03:26:48

标签: clojure clojurescript figwheel

我有一个带有以下

的project.clj
:aliases {
      "build-site" ["run" "-m" "cjohansen-no.web/export"]
    }
:cljsbuild {
    :builds[{
      :id "dev"
      :source-paths ["src/cljs"]
      :figwheel {
      :css-dirs ["resources/public/css"]
      :ring-handler :ring
      }
      :compiler {
             :main scripts.functions,
             :output-to "build/js/main.js",
             :output-dir "build/js/",
             :optimizations :none,
             :source-map true,
             :source-map-timestamp true,
             :recompile-dependents false
           }

别名" build-site"将html文件和资产导出到构建目录

我想运行无花果轮方案,并希望别名在无花果轮进程之前运行或包含在lean figwheel调用中。

我该如何做到这一点?

更新

["run" "-m" "cjohansen-no.web/export" ["cljsbuild" "auto"]]

似乎包含["cljsbuild"....作为参数如何逃脱?

["build-site" ["run" "-m" "cjohansen-no.web/export" ] [":cljsbuild" "auto"]]

给我一​​个

  

地图文字必须包含偶数个表单。

然而在样本中。 project.clj这似乎是一个公认的语法....怎么来的?

继续

  

错误的args(2)数量传递给引用{:form(quote cjohansen-no.web / export [])}

这是导出文件....

(defn export [] (let [assets (optimizations/all (get-assets) {})] (stasis/empty-directory! export-dir) (optimus.export/save-assets assets export-dir) (stasis/export-pages (get-pages) export-dir {:optimus-assets assets})))

这是别名

"build-site" ["run" "-m" "cjohansen-no.web/export []"] "build" ["cljsbuild" "auto"]

这是命令

lein build-site build

0 个答案:

没有答案