Fork me on GitHub
#boot
<
2017-04-05
>
Shantanu Kumar05:04:43

What do boot users use as a substitute for the lein-ring plugin?

juhoteperi06:04:43

dbug* macro is available since a year ago, from 2.6.0

juhoteperi06:04:47

I added mention to the readme: > Works since Boot version 2.6.0 but 2.7.0 is recommended for better error reporting

Josh17:04:00

Hi #boot, I'm trying to adapt the docs from https://github.com/cljsjs/packages/wiki/Non-JS-Assets#boot-task to include a css file from a different cljsjs package (specifically, "material") and it appears I'm doing something wrong, since I'm not seeing the css file end up in my "target" directory. I copy/pasted the (deftask from-jars ...) as-is, and changed the task-options to this:

Josh17:04:06

(task-options!
 from-jars {:imports #{['cljsjs/material
                        "cljsjs/material/development/material.inc.css"
                        "target/material.css"]}})

Josh17:04:05

Then I just added (from-jars) above my (cljs) in my dev task

Josh17:04:20

But no material.css ends up in my target dir

Josh17:04:04

Anyone have any suggestions, or just a link to a bit more docs about how this works?

Josh17:04:25

(Ideally more new-contributor-friendly docs, that don't leave things out as an exercise for the reader, the way https://github.com/cljsjs/packages/wiki/Non-JS-Assets#boot-task does)

martinklepsch17:04:45

@jab from-jars imports files into the Fileset, the fileset gets dumped when you call the target task — are you doing that?

Josh18:04:34

@martinklepsch, I am and still no luck, but thanks so much for making sure! Here's where I do that: https://github.com/jab/uproxy-manager/blob/master/build.boot#L74

Josh18:04:07

(and sorry I didn't see your message till just now!)

Josh18:04:55

(@martinklepsch Btw, is there a version of that from-jars task I can see somewhere that will work for multiple files from a single jar?)

kenny19:04:06

Is there a way to tell what the CLJS compiler options in subsequent tasks are after the cljs task is invoked?

kenny19:04:50

I can read in a .cljs.edn file and figure it out, but I don’t think that file contains the options set directly on the cljs task.

kenny19:04:51

Also, when there is no .cljs.edn file in the fileset, the autogenerated main.cljs.edn file only contains a :require key and value, none of the default options. Is there another way to get the options passed to the cljs task?

richiardiandrea20:04:43

@kenny that is the most difficult problem to solve in boot, conf sharing among tasks 😄

richiardiandrea20:04:23

so at the moment there is no way to know about the cljs.edn file for tasks that are running before boot-cljs, unless you create it explicitely

kenny20:04:01

Luckily in my case the task will always come after the cljs task.

kenny20:04:20

But the generated .cljs.edn file doesn't appear to hold all of the options passed to the compiler.

richiardiandrea20:04:49

ok so in that case I think I might defer the answer to Juho, which I think is reworking that part

richiardiandrea20:04:00

which option do you need?

kenny20:04:29

:optimizations and :source-map

richiardiandrea20:04:55

try to read the metadata of the .cljs.edn file

kenny20:04:11

Yeah I saw that but it doesn't have either of those

kenny20:04:50

It only has :asset-path, :output-dir, :output-to and :main.

richiardiandrea20:04:45

oh ok, yes that can be, I checking where i get that from in boot-figreload

kenny20:04:04

It seems like those could be added though.

kenny20:04:26

Though, it seems like it would be appropriate for it to write the final .cljs.edn file to the fileset

richiardiandrea20:04:18

if it's not in the meta it will require some change in boot-cljs yes, maybe try to open an issue over there

kenny20:04:05

If you explicitly provide a compiler option (e.g. :target :nodejs) then it will appear in the :adzerk.boot-cljs/opts map, but I'd like that map to also contain the default value used. For example, when using :none for optimization, :source-map is defaulted to true.

richiardiandrea20:04:08

@kenny good to know thanks, I don't think a path to that would be that difficult