4
我project.clj
的:cljsbuild
部分有很多重複的:如何避免cljsbuild項目中的重複?
:cljsbuild {
:builds {:dev {:source-paths ["src-cljs"]
:compiler {:output-dir "resources/public/js"
:output-to "resources/public/js/main.js"
:optimizations :whitespace
:pretty-print true
:source-map "resources/public/js/main.map"
:language-in :ecmascript5
:foreign-libs [{:file "third-party/mutation-summary/mutation-summary.js"
:provides ["MutationSummary"]}]}}
:production {:source-paths ["src-cljs"]
:compiler {:output-to "resources/public/js/main-min.js"
:optimizations :advanced
:pretty-print false
:language-in :ecmascript5
:foreign-libs [{:file "third-party/mutation-summary/mutation-summary.js"
:provides ["MutationSummary"]}]}}
:test {:source-paths ["src-cljs" "test-cljs"]
:compiler {:output-to "resources/private/js/unit-test.js"
:optimizations :whitespace
:pretty-print true
:language-in :ecmascript5
:preamble ["react/react.min.js"]
:externs ["react/externs/react.js"]
:foreign-libs [{:file "third-party/mutation-summary/mutation-summary.js"
:provides ["MutationSummary"]}]}}}
:test-commands {"unit-tests" ["slimerjs" :runner
"resources/private/js/unit-test.js"]}}
我敢肯定,它必須能夠使用配置文件刪除此重複,但我Leiningen福缺乏。