all-files ^
returns all the clojure files in a directory
(count (all-files ["test"]))
=> number?
(-> (all-files ["test"])
(get 'hara.io.project-test))
=> #(.endsWith ^String % "/test/hara/io/project_test.clj")
exclude ^
helper function for excluding certain namespaces
(exclude '{lucid.legacy.analyzer :a
lucid.legacy :a
hara.lib.aether :b}
["lucid.legacy"])
=> '{hara.lib.aether :b}
file-lookup ^
creates a lookup of namespaces and files in the project
(-> (file-lookup (project))
(get 'hara.io.project))
=> #(.endsWith ^String % "/src/hara/io/project.clj")
file-namespace ^
reads the namespace of the given path
(file-namespace "src/hara/io/project.clj")
=> 'hara.io.project
file-suffix ^
returns the file suffix for a given type
(file-suffix) => ".clj"
(file-suffix :cljs) => ".cljs"
file-type ^
returns the type of file according to the suffix
(file-type "project.clj")
=> :source
(file-type "test/hara/code_test.clj")
=> :test
in-context ^
creates a local context for executing code functions
(in-context ((fn [current params _ project]
[current (:name project)])))
=> '[hara.io.project-test
hara]
project ^
returns project options as a map
(project)
=> (contains {:name symbol?
:dependencies vector?})
project-file ^
returns the current project file
(project-file)
=> "project.clj"
project-name ^
returns the name, read from the project map
(project-name)
=> 'hara
source-ns ^
returns the source namespace
(source-ns 'a) => 'a
(source-ns 'a-test) => 'a
sym-name ^
returns the symbol of the namespace
(sym-name *ns*)
=> 'hara.io.project-test
(sym-name 'a)
=> 'a
test-ns ^
returns the test namespace
(test-ns 'a) => 'a-test
(test-ns 'a-test) => 'a-test
test-suffix ^
returns the test suffix
(test-suffix) => "-test"