This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-25
Channels
- # admin-announcements (3)
- # alda (2)
- # beginners (10)
- # boot (44)
- # cider (31)
- # cljs-dev (5)
- # cljsjs (2)
- # cljsrn (17)
- # clojure (181)
- # clojure-austin (2)
- # clojure-brasil (18)
- # clojure-canada (1)
- # clojure-conj (5)
- # clojure-dev (11)
- # clojure-gamedev (30)
- # clojure-russia (380)
- # clojure-spec (50)
- # clojure-uk (35)
- # clojurescript (146)
- # clojutre (1)
- # component (1)
- # cursive (62)
- # datomic (27)
- # dirac (7)
- # editors (23)
- # emacs (7)
- # events (34)
- # funcool (22)
- # hoplon (134)
- # jobs (22)
- # jobs-rus (7)
- # juxt (1)
- # kekkonen (1)
- # lein-figwheel (54)
- # leiningen (7)
- # luminus (2)
- # off-topic (5)
- # om (4)
- # onyx (27)
- # proton (5)
- # protorepl (2)
- # re-frame (16)
- # reagent (29)
- # rethinkdb (2)
- # schema (1)
- # untangled (61)
- # yada (9)
@pvinis things in asset-paths
are never on the classpath, so you may want to put icons in resource-paths
instead
then you can use io/resource
yeah 😐
theoretically
i take it you're making a web app? are you using boot to serve it or creating a war?
i see. so in that case, asset-paths could work
the asset/resource distinction is during boot's run, whether or not the file is added to the classpath visibile to you when building
anyway https://github.com/boot-clj/boot/wiki/Filesets#roles-of-files has the details, when in doubt, resource-paths
yeah, it depends where the io/resource code is running, in boot or in code running in the uberjar
"the classpath"
all code on the jvm runs in the context of a classpath, which is a kind of abstract filesystem
the cool part is you can write code to implement what code running in a classpath can see, this is what a classloader is
so when you call io/resource it's asking the context classloader to get the file
even though it has 'class' in the name any kind of file can be in it
such as bla.png
for the purposes of an app like yours, it's nice as an abstraction between your code and the filesystem
dunno if you're into pods yet, but they're a convenient way to make your own classloaders basically
little VM-like objects you control the classpath of, and the classpaths of which don't conflict with the "parent" classpath
they're mostly for implementing tasks
they let tasks use dependencies that people depending on the tasks don't want to depend on directly
like a coffeescript task might bring in some java coffe impl. that comes also with some weird logging framework
the task can run all that stuff in a pod so the person who just wants their coffeescript compiled doesn't have to learn a new logging framework or deal with adding :exclusions
is there a boot task to move (or copy would be even better) some dir in the fileset? i want to copy target/public -> (str “target/public-” (env :asset-tag))
@kenny that was my first thought, but i only see a :move option. i suppose that could work
If you want copy there is also https://github.com/cpmcdaniel/boot-copy