![](/img/trans.png)
[英]Can't Use NodeJS Twitter Library in ClojureScript 1.8 Lein Project
[英]REPL session for a ClojureScript library in the vein of `lein try`
有时我想在REPL中试用一个库。 例如,当我需要知道距现在100天的日期时,我会做:
lein try clj-time
(require '[clj-time.core :as t])
(t/plus (t/today) (t/days 100))
或使用启动:
boot -d clj-time repl -e "(require '[clj-time.core :as t])"
(t/plus (t/today) (t/days 100))
这已经很不错了,但是仍然有几秒钟的启动时间。
我的问题:我可以使用ClojureScript和Node获得相同的功能,并且启动时间可能更快吗? 如何使用cljs-time获得以上示例?
您可以将Planck与想要使用的jar一起使用,方法是将其添加到Planck的“类路径”(由于不涉及JVM,因此不是实际的类路径)。 请参阅“ Planck依赖关系”文档 。
例如:
planck -c ~/.m2/repository/com/andrewmcveigh/cljs-time/0.4.0/cljs-time-0.4.0.jar
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.