Liking cljdoc? Tell your friends :D

code.project


*include*clj


+lookup-nsclj


+project-mapclj


all-filesclj

(all-files)
(all-files paths)
(all-files paths opts)
(all-files paths opts project)

returns all the clojure files in a directory

(count (all-files ["test"])) => number?

(-> (all-files ["test"]) (get 'code.project-test)) => #(.endsWith ^String % "/test/code/project_test.clj")

returns all the clojure files in a directory

(count (all-files ["test"]))
=> number?

(-> (all-files ["test"])
    (get 'code.project-test))
=> #(.endsWith ^String % "/test/code/project_test.clj")
raw docstring

code-filesclj

(code-files)

returns only the code files for the current project

(code-files)

returns only the code files for the current project

(code-files)
raw docstring

code-pathclj

(code-path ns relative)

returns the path of the code

(str (code-path (h/ns-sym) true)) => "test/code/project_test.clj"

returns the path of the code

(str (code-path (h/ns-sym) true))
=> "test/code/project_test.clj"
raw docstring

excludeclj

(exclude lookup exclusions)

helper function for excluding certain namespaces

(exclude '{lucid.legacy.analyzer :a lucid.legacy :a lib.aether :b} ["lucid.legacy"]) => '{lib.aether :b}

helper function for excluding certain namespaces

(exclude '{lucid.legacy.analyzer :a
           lucid.legacy :a
           lib.aether :b}
         ["lucid.legacy"])
=> '{lib.aether :b}
raw docstring

file-lookupclj

(file-lookup)
(file-lookup project)

creates a lookup of namespaces and files in the project

(-> (file-lookup (project)) (get 'code.project)) => #(.endsWith ^String % "/src/code/project.clj")

creates a lookup of namespaces and files in the project

(-> (file-lookup (project))
    (get 'code.project))
=> #(.endsWith ^String % "/src/code/project.clj")
raw docstring

file-namespaceclj

(file-namespace path)

reads the namespace of the given path

(file-namespace "src/code/project.clj") => 'code.project

reads the namespace of the given path

(file-namespace "src/code/project.clj")
=> 'code.project
raw docstring

file-suffixclj

(file-suffix)
(file-suffix type)

returns the file suffix for a given type

(file-suffix) => ".clj"

(file-suffix :cljs) => ".cljs"

returns the file suffix for a given type

(file-suffix) => ".clj"

(file-suffix :cljs) => ".cljs"
raw docstring

file-typeclj

(file-type path)

returns the type of file according to the suffix

(file-type "project.clj") => :source

(file-type "test/code/project_test.clj") => :test

returns the type of file according to the suffix

(file-type "project.clj")
=> :source

(file-type "test/code/project_test.clj")
=> :test
raw docstring

in-contextcljmacro

(in-context [func & args])

creates a local context for executing code functions

(in-context ((fn [current params _ project] current))) => 'code.project-test

creates a local context for executing code functions

(in-context ((fn [current params _ project]
               current)))
=> 'code.project-test
raw docstring

lookup-nsclj

(lookup-ns path)

fast lookup for all-files function

(first (lookup-ns (lookup-path (h/ns-sym)))) => 'code.project-test

fast lookup for all-files function

(first (lookup-ns (lookup-path (h/ns-sym))))
=> 'code.project-test
raw docstring

lookup-ns-rawclj

(lookup-ns-raw path)

helper function for code.project/lookup-ns

helper function for code.project/lookup-ns
raw docstring

lookup-pathclj

(lookup-path ns)

looks up the path given the ns

(lookup-path (h/ns-sym))

looks up the path given the `ns`

(lookup-path (h/ns-sym))
raw docstring

projectclj

(project)
(project path)

returns project options as a map

(project) => (contains {:name symbol? :dependencies vector?})

returns project options as a map

(project)
=> (contains {:name symbol?
              :dependencies vector?})
raw docstring

project-fileclj

(project-file)

returns the current project file

(project-file) => "project.clj"

returns the current project file

(project-file)
=> "project.clj"
raw docstring

project-lookupclj


project-mapclj

(project-map path)

returns the project map

(project-map (fs/path "project.clj"))

returns the project map

(project-map (fs/path "project.clj"))
raw docstring

project-map-rawclj

(project-map-raw path)

helper function for code.project/project-map

helper function for code.project/project-map
raw docstring

project-nameclj

(project-name)
(project-name path)

returns the name, read from the project map

(project-name) => symbol?

returns the name, read from the project map

(project-name)
=> symbol?
raw docstring

source-nsclj

(source-ns ns)

returns the source namespace

(source-ns 'a) => 'a (source-ns 'a-test) => 'a

returns the source namespace

(source-ns 'a) => 'a
(source-ns 'a-test) => 'a
raw docstring

sym-nameclj

(sym-name x)

returns the symbol of the namespace

(sym-name ns) => 'code.project-test

(sym-name 'a) => 'a

returns the symbol of the namespace

(sym-name *ns*)
=> 'code.project-test

(sym-name 'a)
=> 'a
raw docstring

test-nsclj

(test-ns ns)

returns the test namespace

(test-ns 'a) => 'a-test (test-ns 'a-test) => 'a-test

returns the test namespace

(test-ns 'a) => 'a-test
(test-ns 'a-test) => 'a-test
raw docstring

test-suffixclj

(test-suffix)
(test-suffix s)

returns the test suffix

(test-suffix) => "-test"

returns the test suffix

(test-suffix) => "-test"
raw docstring

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

× close