Browse files

matched up with clj-info 0.3.1 and cljs-info 1.0.0

  • Loading branch information...
1 parent d55744c commit dfc3b16ccd6345f8406616bb5f32da4d29bffea2 @franks42 committed Oct 17, 2012
Showing with 22 additions and 7 deletions.
  1. BIN clj-ns-browser-1.4.0-SNAPSHOT.jar
  2. +3 −3 pom.xml
  3. +3 −3 project.clj
  4. +16 −1 src/clj_ns_browser/utils.clj
View
BIN clj-ns-browser-1.4.0-SNAPSHOT.jar
Binary file not shown.
View
6 pom.xml
@@ -95,17 +95,17 @@
<dependency>
<groupId>clj-info</groupId>
<artifactId>clj-info</artifactId>
- <version>0.3.0</version>
+ <version>0.3.1</version>
</dependency>
<dependency>
<groupId>cljs-info</groupId>
<artifactId>cljs-info</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojurescript</artifactId>
- <version>0.0-1505</version>
+ <version>0.0-1503</version>
<exclusions>
<exclusion>
<artifactId>ant</artifactId>
View
6 project.clj
@@ -11,9 +11,9 @@
[clojure-complete "0.2.1" :exclusions [org.clojure/clojure]]
[org.thnetos/cd-client "0.3.6"]
[hiccup "1.0.1"]
- [clj-info "0.3.0"]
- [cljs-info "1.0.0-SNAPSHOT"]
- [org.clojure/clojurescript "0.0-1505"
+ [clj-info "0.3.1"]
+ [cljs-info "1.0.0"]
+ [org.clojure/clojurescript "0.0-1503"
:exclusions [org.apache.ant/ant]]
]
:dev-dependencies [[lein-marginalia "0.7.1"]
View
17 src/clj_ns_browser/utils.clj
@@ -10,6 +10,8 @@
(:require [clojure.set]
[cd-client.core]
[cljs-info.ns]
+ [cljs-info.utils]
+ [cljs-info.repl]
[cljs-info.doc2txt]
[clojure.java.shell]
[clojure.java.io]
@@ -727,6 +729,19 @@
)))))
+(defn cljs-render-fqn-value
+ ""
+ [fqn]
+ (let [fqn-str (cljs-info.utils/cljs-fqname fqn)
+ fqn-sym# (cljs-info.utils/cljs-fqname-sym fqn)
+ js-str (str "(cljs-info.repl/cljs->repl* (quote (if (fn? "fqn-str") (str " fqn-str ") (js->clj " fqn-str "))))")
+ v-s (eval (read-string js-str))
+ v-s-s (read-string v-s)
+ v-r-s (pprint-str v-s-s)
+ ]
+ (str "VALUE: \n" (if (string? v-s-s) (print-str (read-string v-r-s)) v-r-s))))
+
+
(defn render-one-doc-text
"Given a FQN, return the doc or source code as string, based on options."
[fqn doc-opt is-cljs?]
@@ -762,7 +777,7 @@
"Examples" (render-clojuredocs-text fqn :examples is-ns?)
"Comments" (render-clojuredocs-text fqn :comments is-ns?)
"See alsos" (render-clojuredocs-text fqn :see-alsos is-ns?)
- "Value" (render-fqn-value fqn)
+ "Value" (if is-cljs? (cljs-render-fqn-value fqn) (render-fqn-value fqn))
"Meta" (let [s (render-meta fqn)]
(str
(if s (str "META:\n" s) "")

0 comments on commit dfc3b16

Please sign in to comment.