(create-keys project-type)
config-path
- the full path to the config file as a stringReturns
:dependencies
for :lein
and :shadow
:deps
for :default
- `config-path` - the full path to the config file as a string Returns - `:dependencies` for `:lein` and `:shadow` - `:deps` for `:default`
Returns all the dependencies from the config
Returns all the dependencies from the config
(get-config)
Looks in the current directory for the following files
Returns the a string matching the first file that it finds.
Returns nil otherwise
Looks in the current directory for the following files - deps.edn - project.clj - shadow-cljs.edn - bb.edn Returns the a string matching the first file that it finds. Returns nil otherwise
(get-project-type config-path)
config-path
- the full path to the config file as a stringReturns
:shadow
for shadow-cljs.edn:lein
for project.clj:default
for everything else- `config-path` - the full path to the config file as a string Returns - `:shadow` for shadow-cljs.edn - `:lein` for project.clj - `:default` for everything else
(operate operation packet)
operation
- :add
,:update
or :remove
packet
- a map containing the keys :deps
and :id
Keys
deps
- either a map or a vector containing the dependencies,
as defined in project.clj
or deps.edn
filesid
- the artifact identifier, which follows the
[groupID/]artifactID[@version]
schemaOperates on the given packet and returns a new set of dependencies,
which is either a map or vec, depending on what was given to :deps
- `operation` - `:add`,`:update` or `:remove` - `packet` - a map containing the keys `:deps` and `:id` Keys - `deps` - either a map or a vector containing the dependencies, as defined in `project.clj` or `deps.edn` files - `id` - the artifact identifier, which follows the `[groupID/]artifactID[@version]` schema Operates on the given packet and returns a new set of dependencies, which is either a map or vec, depending on what was given to `:deps`
(replace-dependencies {:keys [zloc keys new-deps project-type]})
Takes in a map with the following keys
:project-type
- :lein
, :shadow
or :default
:zloc
- zipper object of config file created by rewrite-clj:keys
- a vector of keys telling Depo which dependencies to replace:new-deps
- a vector or map of the newly written dependenciesReplaces the specified dependencies in a map and returns a string formatted by zprint
Takes in a map with the following keys - `:project-type` - `:lein`, `:shadow` or `:default` - `:zloc` - zipper object of config file created by rewrite-clj - `:keys` - a vector of keys telling Depo which dependencies to replace - `:new-deps` - a vector or map of the newly written dependencies Replaces the specified dependencies in a map and returns a string formatted by zprint
(traverse-zip-map zloc keys)
zloc
- a zipper object created by rewrite-cljkeys
- a vector of keysTraverses the zipper object using z/get
, z
being
the rewrite-clj.zip
namespace, using keys
from left
to right
- `zloc` - a zipper object created by rewrite-clj - `keys` - a vector of keys Traverses the zipper object using `z/get`, `z` being the `rewrite-clj.zip` namespace, using `keys` from left to right
(zip-vec-add-newlines zloc)
zloc
- a zipper object of a vector created by rewrite-cljSplits up a vector of vectors (dependencies) into multiple lines. Indentation is not considered.
- `zloc` - a zipper object of a vector created by rewrite-clj Splits up a vector of vectors (dependencies) into multiple lines. Indentation is not considered.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close