简体   繁体   English

Figwheel未编译所有文件

[英]Figwheel not compiling all files

I have a project.clj file that has sever cljsbuilds and Figwheel seems to only be compiling the first one. 我有一个具有严重的cljsbuilds的project.clj文件,Figwheel似乎仅在编译第一个文件。 Any ideas why? 有什么想法吗?

The project.clj looks like this: project.clj看起来像这样:

(defproject tech.projectx/clients "0.1.0-SNAPSHOT"
  :cljsbuild {:builds {:renderer      {:source-paths ["src/renderer" "src/common"]
                                       :compiler     {:output-to     "app/renderer/renderer.js"
                                                      :output-dir    "app/renderer"
                                                      :asset-path    "renderer"
                                                      :main          configurator.core
                                                      :language-in   :ecmascript5
                                                      :optimizations :none}}
                       :main          {:source-paths ["src/main" "src/common"]
                                       :compiler     {:output-to     "app/main/main.js"
                                                      :output-dir    "app/main"
                                                      :asset-path    "main"
                                                      :main          tech.projectx.main
                                                      :target        :nodejs
                                                      :externs       ["node_modules/closurecompiler-externs/path.js"
                                                                      "node_modules/closurecompiler-externs/process.js"]
                                                      :optimizations :simple}} ; without this, the packed application doesn't work.
                       :renderer-test {:source-paths ["src/renderer" "src/common" "test/renderer"]
                                       :compiler     {:output-to            "test-app/renderer/renderer.js"
                                                      :output-dir           "test-app/renderer"
                                                      :asset-path           "renderer"
                                                      :main                 clientcommon.test-runner
                                                      :language-in          :ecmascript5
                                                      :optimizations        :none
                                                      :source-map           true
                                                      :source-map-timestamp true
                                                      :pretty-print         true}
                                       :figwheel     {:websocket-host "localhost"
                                                      :on-jsload      "clientcommon.test-runner/run-all-tests"}}
                       :test-app-main {:source-paths ["test/main" "src/main" "src/common"]
                                       :compiler     {:output-to            "test-app/main/main.js"
                                                      :output-dir           "test-app/main"
                                                      :asset-path           "main"
                                                      :main                 tech.projectx.test-app-main
                                                      :target               :nodejs
                                                      :externs              ["node_modules/closurecompiler-externs/path.js"
                                                                             "node_modules/closurecompiler-externs/process.js"]
                                                      :optimizations        :none
                                                      :source-map           true
                                                      :source-map-timestamp true
                                                      :pretty-print         true}}}}

  :sass {:source-paths ["src/renderer/assets"]
         :target-path  "app/renderer/assets"
         :source-map   true}

  :figwheel {:server-logfile "log/figwheel-logfile.log"
             :css-dirs       ["app/renderer/assets"]}

  :profiles {:dev  {:cljsbuild {:builds {:renderer {:compiler {:source-map           true
                                                               :source-map-timestamp true
                                                               :pretty-print         true}
                                                    :figwheel {:websocket-host "localhost"
                                                               :on-jsload      "configurator.core/mount-root"}}
                                         :main     {:compiler {:source-map           "app/main/main.js.map"
                                                               :source-map-timestamp true
                                                               :pretty-print         true}}}}}
             :prod {:cljsbuild {:builds {:renderer {:compiler {:optimizations   :simple
                                                               :closure-defines {goog.DEBUG false}}}
                                         :main     {:compiler {:optimizations   :simple
                                                               :closure-defines {goog.DEBUG false}}}}}}})

I'm running Figwheel with a script that looks like this: 我正在使用如下脚本运行Figwheel:

(use 'figwheel-sidecar.repl-api)
(start-figwheel!) ;; <-- fetches configuration
(cljs-repl)

Although you asked, how to pass it to the script, I usually tend to manifest that in the config (in the top level :figwheel entry): 尽管您问过如何将其传递给脚本,但我通常倾向于在配置中(在顶级:figwheel条目中)表明这一点:

:figwheel { :builds-to-start ["dev" "test"] }

Also see the docs: 另请参阅文档:

A vector of build ids that you would like figwheel to start building when you invoke lein figwheel without arguments. 当您不带参数调用lein figwheel时,您希望figwheel开始构建的构建ID的向量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM