簡體   English   中英

Figwheel未編譯所有文件

[英]Figwheel not compiling all files

我有一個具有嚴重的cljsbuilds的project.clj文件,Figwheel似乎僅在編譯第一個文件。 有什么想法嗎?

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}}}}}}})

我正在使用如下腳本運行Figwheel:

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

盡管您問過如何將其傳遞給腳本,但我通常傾向於在配置中(在頂級:figwheel條目中)表明這一點:

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

另請參閱文檔:

當您不帶參數調用lein figwheel時,您希望figwheel開始構建的構建ID的向量。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM