[英]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. 我是Hoplon和Boot的新手。 I am trying to use the "clojure.string" library in a Hoplon project and I can't seem to get it. 我正在尝试在Hoplon项目中使用“ clojure.string”库,但似乎无法获取。 I tried in the index.cljs.hl file: 我在index.cljs.hl文件中尝试过:
(: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: 接下来,我尝试将库包含在build.boot工具中,但似乎都不起作用:
[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. 您需要做的就是在“ index.cljs.hl”文件中,在顶部添加以下内容。
(page "index.html"
(:require [clojure.string :as str]))
And then you can access the string library as (str/split etc. 然后您可以以(str / split等方式访问字符串库。
Cheers, Matt 干杯,马特
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.