【问题标题】:Change Figwheel compile directory with Lein使用 Lein 更改 Figwheel 编译目录
【发布时间】:2019-11-06 03:10:38
【问题描述】:

我正在尝试从 lein-figwheel 移动到 figwheel-main,并且我正在使用 lein。 默认情况下,figwheel-main 编译构建并将其放在 target/public/cljs-out 目录中。 但是我希望它位于不同的位置 resources/public/js/。

我尝试在我的 project.clj 中添加编译路径和目标路径,但没有任何改变。

:profiles {:dev {:dependencies [[com.cemerick/piggieback "0.2.1"]
                                  [org.clojure/tools.nrepl "0.2.12"]]
                   :target-path "resources/public/js"
                   :compile-path "resources/public/js"
                   :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}})

我希望构建编译到resourses/public/js 目录。但我仍然看到它被编译到target/public/cljs-out 目录。我哪里错了?

【问题讨论】:

  • 两个月后,我使用 Clojure Deps 构建从 lein 上的旧 figwheel 切换到 figwheel-main。新的组合更容易理解。我建议将您的 CLJS 构建迁移到 Clojure Deps。

标签: clojurescript figwheel


【解决方案1】:

我使用 lein-cljsbuild 和 figwheel 一起构建 ClojureScript。它具有:cljsbuild :output-to:output-dir 参数,用于控制将文件输出到的目录。从this doc 我认为这是编译文件的正确方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-02-13
    • 1970-01-01
    • 1970-01-01
    • 2016-03-25
    • 2017-12-26
    • 1970-01-01
    • 2018-09-22
    • 2019-08-03
    相关资源
    最近更新 更多