(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")}})(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")
(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(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 {}}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |