Fork me on GitHub
#leiningen
<
2015-12-12
>
pupeno10:12:48

@solicode: so, you mean, with :target-path? Do you understand what it does?, :target-path I mean.

solicode10:12:31

@pupeno: It's where compiled files, uberjars, and things like that get placed when you're compiling Clojure (the default path is just "target"). ClojureScript, on the other hand, you have defined in :cljsbuild (the output directories). So maybe you want all 3, like this?

:clean-targets [:target-path
                [:cljsbuild :builds :app :compiler :output-dir]
                [:cljsbuild :builds :app :compiler :output-to]]

pupeno10:12:23

solicode: that is what I have already, and js is not being cleaned.

solicode10:12:57

You have an extra “:clj” in there, don’t you? I think that could be the problem

solicode10:12:26

[:clj :cljsbuild :builds :app :compiler :output-dir] vs. [:cljsbuild :builds :app :compiler :output-dir]

solicode10:12:43

@pupeno: Also, I'm not sure if ^{:protect false} is needed. It seems like it would be unnecessary, but if it's a problem, try adding it back in.

pupeno10:12:15

Let me try.

pupeno11:12:06

Yup, now it’s working.

pupeno11:12:43

Do you have any ideas what protect used to be for?

solicode11:12:30

I think if you want to delete stuff outside your project directory. So by default, it doesn’t let you do that

solicode11:12:38

Just for safety

solicode11:12:33

Or wait, I think that makes sense. Never mind simple_smile

solicode11:12:19

@pupeno: By the way, did the vector thing make sense? Basically what clean target does when it sees a vector is: (get-in project-map [:cljsbuild :builds :app :compiler :output-dir])

pupeno11:12:38

Yeah, it did. I was just confused about :target-path.