Liking cljdoc? Tell your friends :D

leiningen.change

Rewrite project.clj by applying a function.

Rewrite project.clj by applying a function.
raw docstring

changeclj

(change project key-or-path f & args)

Rewrite project.clj with f applied to the value at key-or-path.

The first argument should be a keyword (or mashed-together keywords for nested values indicating which value to change). The second argument should name a function var which will be called with the current value as its first argument and the remaining task arguments as the rest.

This will append "-SNAPSHOT" to the current version:

$ lein change version str '"-SNAPSHOT"'

When called programmatically, you may pass a coll of keywords for the first arg or an actual function for the second.

Using set as the function argument will set the key directly, rather than applying a function to the original value:

$ lein change version set '"1.0.0"'

All the arguments to f are passed through the reader, so double quoting is necessary to use strings. Note that this task reads the project.clj file from disk rather than honoring the project map, so profile merging or update-in invocations will not affect it.

Rewrite project.clj with f applied to the value at key-or-path.

The first argument should be a keyword (or mashed-together keywords for
nested values indicating which value to change). The second argument
should name a function var which will be called with the current value
as its first argument and the remaining task arguments as the rest.

This will append "-SNAPSHOT" to the current version:

    $ lein change version str '"-SNAPSHOT"'

When called programmatically, you may pass a coll of keywords for the
first arg or an actual function for the second.

Using set as the function argument will set the key directly, rather than
applying a function to the original value:

    $ lein change version set '"1.0.0"'

All the arguments to f are passed through the reader, so double quoting is
necessary to use strings. Note that this task reads the project.clj file
from disk rather than honoring the project map, so profile merging or
`update-in` invocations will not affect it.
sourceraw docstring

change-stringclj

(change-string project-str key-or-path f & args)

Programmatic functional access to project.clj-rewriting.

See the change task function which handles reading and writing from disk as well as turning string args into Clojure data; this function handles the rest.

Programmatic functional access to project.clj-rewriting.

See the `change` task function which handles reading and writing from disk as
well as turning string args into Clojure data; this function handles the rest.
sourceraw docstring

collapse-fnclj

(collapse-fn f args)
source

normalize-pathclj

(normalize-path value)
source

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

× close