Fork me on GitHub
#tools-deps
<
2019-06-26
>
credulous15:06:16

Hi! I’m trying to convert my workflow to clj/deps.edn, and I’m having a bit of trouble with depstar, which I am trying to use to package my app.

ghadi15:06:35

seancorfield/depstar @credulous?

ghadi15:06:56

can you describe what you expected and what you are experiencing?

credulous15:06:14

healthfinch/depstar I think?

credulous15:06:29

Yes I can… I added this to my ~/.clojure/deps.edn:

credulous15:06:33

:depstar {:extra-deps {com.healthfinch/depstar {:git/url ""
                                                     :sha "4aa7b35189693feebc7d7e4a180b8af0326c9164"} }
               :main-opts ["-m" "hf.depstar.uberjar"]
               }

ghadi15:06:51

switch to the fork (I originally wrote healthfinch/depstar but now sean has the canonical repo)

credulous15:06:06

I’ll try that before I describe anything more.

ghadi15:06:17

his README is good, too

credulous15:06:27

In his blog post, Sean is still linking to yours

seancorfield16:06:25

I'll update that blog post when I get to my desk -- thanks for catching that!

seancorfield17:06:57

Updated. Make take a few minutes to clear the cache!

ghadi15:06:42

which blog post?

credulous15:06:43

It’s over a year old. I should have been paying more attention. https://corfield.org/blog/2018/04/18/all-the-paths/

credulous15:06:09

Yup, the fork works. Thanks @ghadi!

credulous15:06:48

And may I also say: @seancorfield is everywhere! What a contributor.

20
ghadi15:06:38

he is a treasure

seancorfield16:06:25

I'll update that blog post when I get to my desk -- thanks for catching that!

credulous17:06:51

Thanks! Also, I’m floundering a bit trying to include my public folder in the uberjar, using depstar. I created an alias with {:extra-paths ["public"]}, but that includes the contents of the public folder into the root of the uberjar. Any advice?

seancorfield17:06:57

Updated. Make take a few minutes to clear the cache!

seancorfield17:06:47

@credulous So you have resources/public -- would {:extra-paths ["resources"]} do what you need?

credulous17:06:19

No, in my project folder I have /resources and /public

seancorfield17:06:27

Don't do that 🙂

seancorfield17:06:50

Put public inside resources -- then your "source" paths are going to be "src" "resources"

seancorfield17:06:18

And in your code, specify that pages etc come from "public" rather than the root of your classpath.

credulous17:06:31

Sounds good. I was cribbing from a complete project on github… boodle, I think.

seancorfield17:06:40

{:root "public"} in Compojure's resources call (assuming you're using that?)

credulous17:06:07

I’m probably using compojure wrong too… I’m not using :root anywhere

credulous17:06:13

(compojure/defroutes app
  (-> (compojure/routes
        (route/resources "/")
        api/routes )
      reload/wrap-reload))

credulous17:06:42

where route/resources defaults to “public” as the source directory, I think