0

I hope these questions are helping someone. I am new to both Hoplon and Boot. I am trying to use the "clojure.string" library in a Hoplon project and I can't seem to get it. I tried in the index.cljs.hl file:

(:require [clojure.string :as str]))

And then it doesn't load. Next I tried including the library in the build.boot tool but neither seemed to work:

 [org.clojure/clojure.string "1.8.0"]
 [org.clojure/clojure-string "1.8.0"]

Neither of those seemed to work so I am looking on how I can use the string library.

Cheers, Matt

phlie
  • 1,335
  • 3
  • 10
  • 19

1 Answers1

1

After much searching I finally figured out how to do it. All you need to do is in the "index.cljs.hl" file add the following at the top.

(page "index.html"
    (:require [clojure.string :as str]))

And then you can access the string library as (str/split etc.

Cheers, Matt

phlie
  • 1,335
  • 3
  • 10
  • 19
  • On second thoughts, it doesn't seem to work in the index.cljs.hl folder. I'll keep working at it. – phlie Aug 09 '17 at 04:43
  • `clojure.string` is a namespace in clojure it self, not a library, you do not need special depends vectors; [here](https://github.com/hoplon/demos/blob/62d8c0301512c073f3cb724138193fc67ee2d712/castra-notify-chat/src/hl/castra_notify_chat/index.cljs.hl) is a hoplon example where clojure.string is used, your aproach should be the right one – birdspider Aug 09 '17 at 15:16