(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")
(code-files)
returns only the code files for the current project
(code-files)
returns only the code files for the current project (code-files)
(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"
(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}
(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")
(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
(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"
(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
(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
(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
(lookup-ns-raw path)
helper function for code.project/lookup-ns
helper function for code.project/lookup-ns
(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))
(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?})
(project-file)
returns the current project file
(project-file) => "project.clj"
returns the current project file (project-file) => "project.clj"
(project-map path)
returns the project map
(project-map (fs/path "project.clj"))
returns the project map (project-map (fs/path "project.clj"))
(project-map-raw path)
helper function for code.project/project-map
helper function for code.project/project-map
(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?
(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
(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
(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
(test-suffix)
(test-suffix s)
returns the test suffix
(test-suffix) => "-test"
returns the test suffix (test-suffix) => "-test"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close