Liking cljdoc? Tell your friends :D

hydrox.analyse


access-pathsclj

source

add-codeclj

(add-code {:keys [project] :as folio} file type)
source

add-documentationclj

(add-documentation {:keys [project] :as folio} file)
source

add-fileclj

(add-file {:keys [project] :as folio} file)

adds a file to the folio (-> {:project (util/read-project (io/file "example/project.clj"))} (add-file (io/file "example/test/example/core_test.clj")) (add-file (io/file "example/src/example/core.clj")) (dissoc :project)) => (contains-in {:registry {(str user-dir "/example/test/example/core_test.clj") {'example.core {'foo {:docs vector?, :meta {:added "0.1"}}}}, (str user-dir "/example/src/example/core.clj") {'example.core {'foo {:source "(defn foo\n [x]\n (println x "Hello, World!"))"}}}}, :references {'example.core {'foo {:docs vector?, :meta {:added "0.1"}, :source "(defn foo\n [x]\n (println x "Hello, World!"))"}}}, :namespace-lu {'example.core (str user-dir "/example/src/example/core.clj")}})

adds a file to the folio
(-> {:project (util/read-project (io/file "example/project.clj"))}
    (add-file (io/file "example/test/example/core_test.clj"))
    (add-file (io/file "example/src/example/core.clj"))
    (dissoc :project))
=> (contains-in
    {:registry {(str user-dir "/example/test/example/core_test.clj")
                {'example.core
                {'foo {:docs vector?, :meta {:added "0.1"}}}},
                (str user-dir "/example/src/example/core.clj")
                {'example.core
                 {'foo {:source "(defn foo\n  [x]\n  (println x \"Hello, World!\"))"}}}},
     :references {'example.core
                  {'foo {:docs vector?, :meta {:added "0.1"},
                         :source "(defn foo\n  [x]\n  (println x \"Hello, World!\"))"}}},
     :namespace-lu {'example.core (str user-dir "/example/src/example/core.clj")}})
sourceraw docstring

add-projectclj

(add-project {:keys [project] :as folio} file)
source

canonicalclj

(canonical path)

returns the canonical system path

(canonical "src") => (str (System/getProperty "user.dir") "/src")

returns the canonical system path

(canonical "src")
=> (str (System/getProperty "user.dir") "/src")
sourceraw docstring

file-typeclj

(file-type project file)

returns the file-type for entries

(file-type {:source-paths ["src"] :test-paths ["test"]} (io/file "src/code.clj")) => :source

returns the file-type for entries

(file-type {:source-paths ["src"]
            :test-paths   ["test"]} (io/file "src/code.clj"))
=> :source
sourceraw docstring

remove-fileclj

(remove-file folio file)

removes a file to the folio (-> {:project (util/read-project (io/file "example/project.clj"))} (add-file (io/file "example/src/example/core.clj")) (remove-file (io/file "example/src/example/core.clj")) (dissoc :project)) => {:registry {} :references {} :namespace-lu {}}

removes a file to the folio
(-> {:project (util/read-project (io/file "example/project.clj"))}
    (add-file (io/file "example/src/example/core.clj"))
    (remove-file (io/file "example/src/example/core.clj"))
    (dissoc :project))
=> {:registry {}
    :references {}
    :namespace-lu {}}
sourceraw docstring

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

× close