简体   繁体   中英

How to add the clojure.string library to a front-end Hoplon project using the Boot-clj build tool

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM