Clojars artifact contains dev time compiled Clojurescript
Hi!
Through a rabbit hole, I noticed that the Clojars artifact of this library contains development time compiled Clojurescript output:
0% unzip -l markdown-to-hiccup-0.6.1.jar | grep public/ | tail
491134 01-23-2018 21:33 public/js/out/cljs/pprint.js
19489 01-23-2018 21:33 public/js/out/cljs/reader.js
181595 11-29-2018 07:31 public/js/out/cljs/pprint.js.map
2154 01-23-2018 21:33 public/js/out/cljs/repl.cljs
0 11-29-2018 07:31 public/js/out/process/
565 01-23-2018 21:33 public/js/out/process/env.cljs
589 01-23-2018 21:33 public/js/out/process/env.cljs.cache.edn
223 01-23-2018 21:33 public/js/out/process/env.js
257 11-29-2018 07:31 public/js/out/process/env.js.map
708 11-29-2018 07:40 public/js/example.js
I guess this doesn't need to be in the distributed jar?
To outline this a bit more, the Clojars artifact also contains a public/index.html entry, in which case, any user of this library, serving a index.html via (io/resource "public/index.html") risks getting the dev time version (accidentally) published in this library, instead of their own resource:
0% unzip -l markdown-to-hiccup-0.6.2.jar | grep index.html
164 12-01-2018 15:50 public/index.html
Hi there,
Yeah that probably doesn’t need to be there. There is some general cleaning up I need to do in this repository and I plan to get to it this weekend. When I do I’ll make sure to tackle this.
Neat!
I guess adding resources/public to :clean-targets in project.clj or putting the dev time cljsbuild to :dev profile together with a separate resource path + clean-target, could avoid putting compilation resources onto the classpath at jar time.
Any updates on this? I just went down the same rabbit hole in a project with a lein figwheel ring handler. It should have been serving a dynamically generated index.html file, but instead, I kept getting the index.html file from this repo because it found it on the path and would not fall through to my handler.