Liking cljdoc? Tell your friends :D

code.doc.collect.reference


collect-referencesclj

(collect-references {:keys [articles project] :as interim} name)

collects all :reference tags of within an article

(let [project (project/project) project (assoc project :lookup (project/file-lookup project)) elems (parse/parse-file "src-doc/documentation/code_doc.clj" project) bundle {:articles {"code.doc" {:elements elems}} :references {} :project project}] (-> (collect-references bundle "code.doc") :references keys)) => '(code.doc.parse)

collects all `:reference` tags of within an article

(let [project (project/project)
      project (assoc project :lookup (project/file-lookup project))
      elems   (parse/parse-file "src-doc/documentation/code_doc.clj" project)
      bundle  {:articles {"code.doc" {:elements elems}}
               :references {}
               :project project}]
  (-> (collect-references bundle "code.doc")
      :references
     keys))
=> '(code.doc.parse)
raw docstring

find-import-namespacesclj

(find-import-namespaces lookup ns)

finds forms with (module/include ...)

;; THIS NEEDS FIXING to use h/intern-all as well as module/include (find-import-namespaces (project/file-lookup (project/project)) 'code.test) => () #_'(code.test.checker.common code.test.checker.collection code.test.checker.logic code.test.compile)

finds forms with `(module/include ...)`

;; THIS NEEDS FIXING to use h/intern-all as well as module/include
(find-import-namespaces (project/file-lookup (project/project))
                        'code.test)
=> () #_'(code.test.checker.common
          code.test.checker.collection
          code.test.checker.logic
          code.test.compile)
raw docstring

reference-namespacesclj

(reference-namespaces references lookup namespaces)

finds the referenced vars in the namespace

(-> (reference-namespaces {} (project/file-lookup (project/project)) '[jvm.artifact.common]) (get 'jvm.artifact.common) keys sort) => '(resource-entry resource-entry-symbol)

finds the referenced vars in the namespace

(-> (reference-namespaces {}
                          (project/file-lookup (project/project))
                          '[jvm.artifact.common])
    (get 'jvm.artifact.common)
    keys
    sort)
=> '(resource-entry resource-entry-symbol)
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close