【问题标题】:REPL session for a ClojureScript library in the vein of `lein try`与 `lein try` 类似的 ClojureScript 库的 REPL 会话
【发布时间】:2016-07-28 12:33:06
【问题描述】:

有时我想在 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 获得上面的示例?

【问题讨论】:

    标签: node.js clojure clojurescript read-eval-print-loop


    【解决方案1】:

    您可以将 Planck 与您想要尝试的 jar 一起使用,方法是将其添加到 Planck 的“类路径”(它不是实际的类路径,因为不涉及 JVM)。请参阅Planck Dependencies documentation

    例如:

    planck -c ~/.m2/repository/com/andrewmcveigh/cljs-time/0.4.0/cljs-time-0.4.0.jar
    

    【讨论】:

    猜你喜欢
    • 2021-09-17
    • 1970-01-01
    • 1970-01-01
    • 2019-11-27
    • 1970-01-01
    • 2012-05-15
    • 1970-01-01
    • 1970-01-01
    • 2012-12-31
    相关资源
    最近更新 更多