Clojure projectsλ︎
A Clojure CLI project is defined by a deps.edn
file that specifies source and library paths to use for the project. The deps.edn
file can also define aliases which can optionally be included when running the REPL to support development related tasks.
Generate a project from a template
Create a project from a template to save time creating a common project structure.
Practicalli clojure-app-template example project
practicalli/clojure-app-template provides a production grade example of a project starting point, with additional configuration files for building and deploying the project.
Create a minimal projectλ︎
Create a deps.edn
file containing {}
in the root of a directory for a minimal configuration.
Create a src
directory as the root of the source code, and test
directory to contain unit test code.
Linux command to create a minimal clojure project
Run these Linux commands in the root of a directory to create a minimal Clojure project structure.
The project can now be run with a REPL via a terminal UI or Clojure aware Editor.
Migrate project to Clojure CLI
General form of a Clojure projectλ︎
The essence of most Clojure CLI projects contains the following files and directories.
path | purpose |
---|---|
deps.edn | core project configuration, paths, dependencies and aliases |
build.clj | build specific configuration, create jars and uberjars |
src | root directory of Clojure source files |
test | root directory for Clojure test source files |
README.md | Description of the project and how to develop / maintain it |
CHANGELOG.md | Meaningful history of changes to the project organised by release |
.git | Local git repository and configuration |
.gitignore | Git ignore patterns for the project |
Practicalli clojure-app-template example project
practicalli/clojure-app-template provides a production grade example of a project starting point, with additional configuration files for building and deploying the project.