There is actually already a function available in the ns leiningen.new.templates called raw-resourcer
Create an additional renderer: (def raw (raw-resource <template>)) .... (->files data ... ["resource" (raw "resource")] ... On Monday, January 26, 2015 at 4:20:48 AM UTC-5, Sven Richter wrote: > > After searching through github I found this method unpack: > https://github.com/tailrecursion/hlisp-template/blob/65b89bd257eca86c4ce76b82066a0b059323cdfb/src/leiningen/new/hlisp.clj > > which does the trick. > > In the end it manually copies from the jar file to a local folder. I > wonder if there is a simpler way to do this? > > Thanks, > Sven > > Am Sonntag, 25. Januar 2015 23:34:27 UTC+1 schrieb Sven Richter: >> >> Hm, I don't understand this, it seems like everyone is doing it like this: >> >> https://github.com/stammi/slides2-lein-template/blob/97c2df63b3fbddf0b09e8b501efce75ef4cb233e/src/leiningen/new/slides2_lein_template.clj >> >> (l. 15) >> And I get a copied file when I do that in my new application, but I >> cannot open it. It is not recognized as a gif file. >> >> Any Ideas what might be wrong here? >> >> You can find the complete source here: >> https://github.com/sveri/closp/blob/master/src/leiningen/new/closp.clj >> >> Thanks, >> Sven >> >> Am Sonntag, 25. Januar 2015 18:18:10 UTC+1 schrieb Sven Richter: >>> >>> Hi, >>> >>> I am creating a new leiningen template. Now I do have a binary file >>> (gif) which I want to copy. >>> >>> I tried several things like: >>> >>> ["resources/public/img/browser_carousel_small.jpg" (io/resource >>> "loading.gif")] for instance, but none of it worked. >>> Sometimes I got it copied, but it was not readable as an image and could >>> not be opened. >>> >>> What is the correct way to copy binary files within a leiningen template? >>> >>> Thanks, >>> Sven >>> >>> >>> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.