gpt4 book ai didi

clojure - 如何修复错误 "Deleting non-target project paths ["test-app/renderer/renderer.js%s"] is not allowed."when clean my project?

转载 作者:行者123 更新时间:2023-12-04 03:11:42 25 4
gpt4 key购买 nike

当我运行 lein clean 时,出现此错误:

Deleting non-target project paths ["test-app/renderer/renderer.js%s"] is not allowed.

什么使路径成为目标项目路径?如何使路径成为目标项目路径?我的 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"]}


:clean-targets [[:cljsbuild :builds :renderer :compiler :output-to]
[:cljsbuild :builds :renderer :compiler :output-dir]
[:cljsbuild :builds :main :compiler :output-to]
[:cljsbuild :builds :main :compiler :output-dir]
[:cljsbuild :builds :renderer-test :compiler :output-to]
[:cljsbuild :builds :renderer-test :compiler :output-dir]
[:cljsbuild :builds :test-app-main :compiler :output-to]
[:cljsbuild :builds :test-app-main :compiler :output-dir]
"dist"]

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

最佳答案

它是一种内置的安全机制,可防止您意外删除不需要的内容(例如项目目录之外的内容等)。如果您仍想继续清理,请像这样修改您的 project.clj:

:clean-targets ^{:protect false} [....]

有关更多详细信息,请查看此来源中的完整性检查 protected 路径 函数:https://github.com/technomancy/leiningen/blob/master/src/leiningen/clean.clj

关于clojure - 如何修复错误 "Deleting non-target project paths ["test-app/renderer/renderer.js%s"] is not allowed."when clean my project?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44808615/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com