New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS assets in package but unable to retrieve #21

Closed
danielsz opened this Issue Feb 18, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@danielsz
Contributor

danielsz commented Feb 18, 2015

The from-cljsjs task won't don't do anything to the CSS assets even if present in packages. I would like to sift them to my target directory. I have tried unsuccessfully to do that with the sift task. Can anyone help? Maybe an example sift invocation, or better, a from-cljsjs-css task that will put the CSS in the target directory, maybe under CSS?

@danielsz

This comment has been minimized.

Show comment
Hide comment
@danielsz

danielsz Feb 18, 2015

Contributor

With guidance from @micha, I managed to retrieve the coveted assets with following invocation:

(sift :to-resource #{#"images"}) 
(sift :to-resource #{#"leaflet.inc.css"})

Inside a task, for example:

(deftask build-dev []
  (comp
   (from-cljsjs :profile :development)
   (sift :to-resource #{#"images"})
   (sift :to-resource #{#"leaflet.inc.css"})
   (cljs :optimizations :none :unified-mode true)))
Contributor

danielsz commented Feb 18, 2015

With guidance from @micha, I managed to retrieve the coveted assets with following invocation:

(sift :to-resource #{#"images"}) 
(sift :to-resource #{#"leaflet.inc.css"})

Inside a task, for example:

(deftask build-dev []
  (comp
   (from-cljsjs :profile :development)
   (sift :to-resource #{#"images"})
   (sift :to-resource #{#"leaflet.inc.css"})
   (cljs :optimizations :none :unified-mode true)))
@rwillig

This comment has been minimized.

Show comment
Hide comment
@rwillig

rwillig Feb 22, 2015

@danielsz

I had a different but similar experience. if you are using any cljsjs libraries which have additional .inc.js files like, for example, moment which has about 70 locale files which all end in .inc.js, running from-cljsjs before the cljs task will bring all those .inc.js files into your target. This is most probably not what you want; it certainly wasn't good for my project. I've adopted the practice of calling from-cljsjs after cljs task in those instances where i need to use it at all.

rwillig commented Feb 22, 2015

@danielsz

I had a different but similar experience. if you are using any cljsjs libraries which have additional .inc.js files like, for example, moment which has about 70 locale files which all end in .inc.js, running from-cljsjs before the cljs task will bring all those .inc.js files into your target. This is most probably not what you want; it certainly wasn't good for my project. I've adopted the practice of calling from-cljsjs after cljs task in those instances where i need to use it at all.

@danielsz

This comment has been minimized.

Show comment
Hide comment
@danielsz

danielsz Feb 22, 2015

Contributor

👍

Contributor

danielsz commented Feb 22, 2015

👍

@Deraen

This comment has been minimized.

Show comment
Hide comment
@Deraen

Deraen Oct 26, 2016

Member

I think this is quite well documented nowadays: https://github.com/cljsjs/packages/wiki/Non-JS-Assets

Member

Deraen commented Oct 26, 2016

I think this is quite well documented nowadays: https://github.com/cljsjs/packages/wiki/Non-JS-Assets

@Deraen Deraen closed this Oct 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment