clj-boot.core

clj-boot’s built-in tasks are defined here.

assert-project-type

(assert-project-type & {:as *opts*, :keys [help expect]})

A task that fails the build if the current project is not a legal type. Legal types are members of the project-types set. In addition, may test that the current project is exactly a single type via the ‘expect’ parameter.

Keyword Args: :help bool Print this help info. :expect kw The expected project type

cider

(cider & {:as *opts*, :keys [help]})

Add Cider dependencies for development tools that expect Cider middleware in the REPL. Not all tools expect this and it adds dependencies to your build so it’s not enabled by default. Usage example:

“boot cider dev” ; or (boot cider dev)

Keyword Args: :help bool Print this help info.

cmd

(cmd & {:as *opts*, :keys [help run]})

Run a shell command in a task.

Keyword Args: :help bool Print this help info. :run str The shell command to run.

dev

(dev & {:as *opts*, :keys [help]})

Interactively dev/test with a live application that automatically reloads changed namespaces. When you start dev mode, the nrepl server port is printed. To use this with Cider middleware, add the “cider” task ahead of the “dev” task. For example:

“boot cider dev ” ; or (boot cider dev)

Keyword Args: :help bool Print this help info.

generate-full-site

(generate-full-site & {:as *opts*, :keys [help renderer]})

Generate web site from site-src/*.md and Codox generated from source code. See the Getting Started Guide for details.

Keyword Args: :help bool Print this help info. :renderer sym A renderer function per Perun’s documentation. Defaults to ’clj-boot.docs/renderer.

generate-site

(generate-site & {:as *opts*, :keys [help renderer]})

Generate web site from site-src/*.md only. This version is much faster if you are just working on the Markdown documentation. See the Getting Started Guide for details.

Keyword Args: :help bool Print this help info. :renderer sym A renderer function per Perun’s documentation. Defaults to ’clj-boot.docs/renderer.

lint

(lint & {:as *opts*, :keys [help]})

Reveal uncleanliness in the codebase.

Keyword Args: :help bool Print this help info.

project-type

The current project type ref. Defaults to :private.

project-types

Available project types set. Currently one of :open-source or :private. Only :open-source projects can push to Clojars or gh-pages.

release

(release & {:as *opts*, :keys [help renderer]})

Release a Jar to Clojars. Project type must be :open-source.

Depends on CLOJARS_USER, CLOJARS_PASS, CLOJARS_GPG_USER, CLOJARS_GPG_PASS, envars. See the Getting Started Guide for details.

Keyword Args: :help bool Print this help info. :renderer sym A renderer function per Perun’s documentation. Defaults to ’clj-boot.docs/renderer.

release-local

(release-local & {:as *opts*, :keys [help]})

Build a jar and release it to the local repository.

Keyword Args: :help bool Print this help info.

release-site

(release-site & {:as *opts*, :keys [help version renderer]})

Push updated documentation to gh-pages. See https://gist.github.com/cobyism/4730490 for the technique used.

Keyword Args: :help bool Print this help info. :version str The current project version :renderer sym A renderer function per Perun’s documentation. Defaults to ’clj-boot.docs/renderer.

serve-site

(serve-site & {:as *opts*, :keys [help port]})

Serve the current web site documentation at localhost:3000. Normally invoked composed with watchers and generators. e.g.: (boot (watch) (generate-site) (serve-site))

Keyword Args: :help bool Print this help info. :port int The port on localhost for serving the project web site. Defaults to 3000.

set-task-options!

(set-task-options! {:keys [project project-name project-openness description version scm-url test-sources test-resources push-repository]})

Set default options for standard tasks. This must be called at the end of build.boot. See the Getting Started Guide for details.

snapshot

(snapshot & {:as *opts*, :keys [help]})

Build and release a snapshot to Clojars. Project type must be :open-source.

Depends on CLOJARS_USER, CLOJARS_PASS, CLOJARS_GPG_USER, CLOJARS_GPG_PASS, envars. See the Getting Started Guide for details.

Keyword Args: :help bool Print this help info.

uberbin

(uberbin & {:as *opts*, :keys [help]})

Run tests, and build a direct-executable, aot’d uberjar.

Keyword Args: :help bool Print this help info.

uberjar

(uberjar & {:as *opts*, :keys [help]})

Run tests, and build an uberjar.

Keyword Args: :help bool Print this help info.

write-full-site

(write-full-site & {:as *opts*, :keys [help renderer port]})

Interactively work on web site documentation. Watches the file system and calls (generate-full-site) whenever anything changes.

Keyword Args: :help bool Print this help info. :renderer sym A renderer function per Perun’s documentation. Defaults to ’clj-boot.docs/renderer. :port int The port on localhost for serving the project web site. Defaults to 3000.

write-site

(write-site & {:as *opts*, :keys [help renderer port]})

Interactively work on web site documentation. Watches the file system and calls (generate-site) whenever anything changes.

Keyword Args: :help bool Print this help info. :renderer sym A renderer function per Perun’s documentation. Defaults to ’clj-boot.docs/renderer. :port int The port on localhost for serving the project web site. Defaults to 3000.