Fork me on GitHub
#cljsjs
<
2018-10-29
>
tmarble15:10:13

How can I use CSS from a CLJSJS package? I am using the JavaScript from https://github.com/cljsjs/packages/blob/master/react-datepicker/build.boot#L29 and (per the link above) I can verify that the *.css files are present in the jar... BUT they do not land next to the Javascript (in resources/public/dev/cljsjs/react-datepicker/development/ )???? For extra credit.. why isn't the upstream SASS part of the CLJSJS jar (my project uses SASS) https://github.com/Hacker0x01/react-datepicker/tree/master/src/stylesheets

juhoteperi15:10:27

@tmarble https://github.com/cljsjs/packages/wiki/Non-JS-Assets, and SASS: each file needs to be included in packaging script

tmarble15:10:58

ugh... that's brutal.. I have to extract them myself from the jar?

tmarble15:10:22

thx for the pointer!

juhoteperi15:10:27

For SASS files, you could update Cljsjs packaging script or use [org.webjars.npm/react-datepicker "1.5.0"] just for SASS files (sass4clj can import files from cljsjs and webjars)

tmarble21:10:12

It turns out that I can use ring-cljsjs to serve non-JS artifacts from CLJSJS jars (and I think that's a better solution than vendoring upstream SASS)... Thanks again for the pointer