This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-13
Channels
- # announcements (6)
- # babashka (96)
- # beginners (159)
- # calva (16)
- # cider (17)
- # clj-kondo (4)
- # cljdoc (6)
- # cljfx (3)
- # clojure (202)
- # clojure-europe (21)
- # clojure-italy (2)
- # clojure-nl (36)
- # clojure-spec (6)
- # clojure-uk (16)
- # clojurescript (29)
- # conjure (25)
- # cursive (29)
- # data-science (12)
- # datalog (18)
- # datomic (58)
- # depstar (73)
- # duct (16)
- # emacs (65)
- # events (3)
- # fulcro (8)
- # honeysql (12)
- # jackdaw (6)
- # jobs (7)
- # jobs-discuss (3)
- # kaocha (50)
- # leiningen (8)
- # lsp (14)
- # malli (83)
- # meander (34)
- # off-topic (2)
- # polylith (4)
- # proletarian (7)
- # re-frame (8)
- # releases (9)
- # remote-jobs (3)
- # shadow-cljs (101)
- # sql (1)
- # tools-deps (48)
- # vim (7)
- # xtdb (13)
- # yada (14)
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 @U051SS2EU. 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