Hi. :clean-targets
isn't really working, is it? I am working on a project generated by template. The sections goes like:
:clean-targets ^{:protect false} ["resources/main.js"
"resources/public/js/ui-core.js"
"resources/public/js/ui-core.js.map"
"resources/public/js/ui-out"]
But lein clean
never deletes these folders and files. I fail to find an official documentation, just a master sample:
https://raw.githubusercontent.com/technomancy/leiningen/master/sample.project.clj
which depicts a completely different structure under :clean-targets
. Same as from a poor fellow on stackoverflow:
https://stackoverflow.com/questions/38387800/lein-clean-temporary-output-folder
So I changed it to:
:clean-targets ^{:protect false} [:target-path
:output-paths ["resources/public/js/ui-out"
"resources/public/js/ui-release-out"]
"resources/main.js"
"resources/public/js/ui-core.js"
"resources/public/js/ui-core.js.map"]
And lein clean
is finally doing... Dickie McGeezack. Nadda. There is no official documetation on stuff like this? I again fail miserably to find docs on Clojure stuff. Any hints would be greatly appreciated!@bastilla the best docs of lein config are in lein help sample
-
searching the output finds this
;; :clean-targets below lets `lein clean` remove files under "target",
;; "classes", "foo", "bar", "qux", and "out".
;; By default, will protect paths outside the project root and within standard
;; lein source directories ("src", "test", "resources", "doc", "project.clj").
;; However, this protection can be overridden with metadata on the :clean-targets
;; vector - ^{:protect false}
the wiki probably has more detail, but help sample has been my go to starting place
oh, you referenced the same document, OK
@bastilla regarding you config there, the formatting makes it look like you think that the vector after :output-paths is an argument to it?
Terribly sorry for my late response. Thanks @noisesmith. Your mind reading capabilities are intact. I assumed an association where there is just a vector. Still, lein clean
doesn't work, and it should with this seting. I "solved" it by putting everything in a clean.sh, and ./clean.sh
is just as easy to handle. Thanks for your eyes, ears and time.
my understanding is that each entry is either a string for a specific path, a vector of strings for convenience, or a keyword which looks up the string or vector defined for that keyword
so putting :output-paths in the vector tells it to remove everything in :output-paths