Fork me on GitHub
#boot
<
2016-08-24
>
molstt07:08:46

when using checkout dependencies to reference clojurescript libs, should the deps be precompiled in the dependency jar(s), or should they just contain the clj/cljc/cljs files to let the main project compile the deps?

martinklepsch08:08:54

@molstt clojurescript deps contain cljs files, any compilation is done when you run the compiler in your project using those deps

molstt08:08:15

ok thx, I think I just don't get the jar right with boot.. it contains a main.out, but to work it needs to have the deps in the root, it seems..

molstt08:08:40

otherwise the main proj does not find the namespaces in the lib

martinklepsch08:08:59

the contents of whats in src should be found at the root of the jar

molstt09:08:34

checkouts is working like a charm now after adding the src dir as a resource dir as well! thanks for the tips 😊

vikeri13:08:13

What is the best way of slurping the content of a file in the fileset? I have a config file that I would like to read the values from.

micha13:08:58

@vikeri suppose the file in the fileset has the path foo/bar.edn

micha13:08:05

in a task you can do the following:

micha13:08:08

(deftask read-foobar-edn
  []
  (with-pass-thru fileset
    (let [foobar (->> fileset
                      (input-files)
                      (by-path ["foo/bar.edn"])
                      (tmp-file)
                      (slurp)
                      (read-string))]
      (prn :foobar foobar))

vikeri13:08:42

@micha Ok! And can I use the returned value somehow?

micha13:08:02

which returned value?

vikeri13:08:40

foobar, or should I maybe extract that to a function if I want to read different files. What I have now is this:

(defn reader
  "Reads a file and returns its value"
  [file fileset]
  (->> fileset
       input-files
       (by-path [file])
       first
       tmp-file
       slurp))

micha14:08:40

sure a function would work there

micha14:08:50

it's just regular clojure 🙂

vikeri14:08:09

Yes, not too used to working with files though since I do mostly cljs...