technomancy/leiningen


Automate Clojure projects without setting your hair on fire.

https://leiningen.org

License: Other

Language: Clojure


Leiningen

CircleCI

Leiningen logo

"Leiningen!" he shouted. "You're insane! They're not creatures you can fight—they're an elemental—an 'act of God!' Ten miles long, two miles wide—ants, nothing but ants! And every single one of them a fiend from hell..."

Leiningen is for automating Clojure projects without setting your hair on fire.

Installation

If your preferred package manager offers a recent version of Leiningen, try that first as long as it has version 2.x.

Leiningen installs itself on the first run of the lein shell script; there is no separate install script. Follow these instructions to install Leiningen manually:

  1. Make sure you have Java installed; OpenJDK version 8 is recommended at this time.
  2. Download the lein script from the stable branch of this project.
  3. Place it on your $PATH. (~/bin is a good choice if it is on your path.)
  4. Set it to be executable. (chmod +x ~/bin/lein)
  5. Run it.

Windows users can use the above script in the Linux subsystem or try the batch file or Powershell version instead.

Basic Usage

The tutorial has a detailed walk-through of the steps involved in creating a new project, but here are the commonly-used tasks:

$ lein new [TEMPLATE] NAME # generate a new project skeleton

$ lein test [TESTS] # run the tests in the TESTS namespaces, or all tests

$ lein repl # launch an interactive REPL session

$ lein run -m my.namespace # run the -main function of a namespace

$ lein uberjar # package the project and dependencies as standalone jar

$ lein deploy clojars # publish the project to Clojars as a library

Use lein help to see a complete list. lein help $TASK shows the usage for a specific task.

You can also chain tasks together in a single command by using the do task with comma-separated tasks:

$ lein do clean, test foo.test-core, jar

Most tasks need to be run from somewhere inside a project directory to work, but some (new, help, search, version, and repl) may run from anywhere.

Configuration

The project.clj file in the project root should look like this:

(defproject myproject "0.5.0-SNAPSHOT"
  :description "A project for doing things."
  :license "Eclipse Public License 1.0"
  :url "http://github.com/technomancy/myproject"
  :dependencies [[org.clojure/clojure "1.8.0"]]
  :plugins [[lein-tar "3.2.0"]])

The lein new task generates a project skeleton with an appropriate starting point from which you can work. See the sample.project.clj file (also available via lein help sample) for a detailed listing of configuration options.

The project.clj file can be customized further with the use of profiles.

Documentation

Leiningen documentation is organized as a number of guides:

Usage

Development

Plugins

Leiningen supports plugins which may introduce new tasks. See the plugins wiki page for a full list. If a plugin is needed for successful test or build runs, (such as lein-tar) then it should be added to :plugins in project.clj, but if it's for your own convenience (such as lein-pprint) then it should be added to the :plugins list in the :user profile in ~/.lein/profiles.clj. See the profiles guide for details on how to add to your :user profile. The plugin guide explains how to write plugins.

License

Source Copyright © 2009-2018 Phil Hagelberg, Alex Osborne, Dan Larkin, and contributors. Distributed under the Eclipse Public License, the same as Clojure uses. See the file COPYING.

Thanks to Stuart Halloway for Lancet and Tim Dysinger for convincing me that good builds are important.

Images Copyright © 2010 Phil Hagelberg. Distributed under the Creative Commons Attribution + ShareAlike License. Full-size version available.

Project Statistics

Sourcerank 12
Repository Size 5.98 MB
Stars 6,354
Forks 1,486
Watchers 246
Open issues 207
Dependencies 48
Contributors 351
Tags 69
Created
Last updated
Last pushed

Top Contributors See all

Phil Hagelberg Jean Niklas L'orange Colin Jones Matjaz Gregoric Michael Klishin Anthony Grimes Justin Balthrop Hugo Duncan Chas Emerick Dan Larkin Nelson Morris Florian Anderiasch Toby Crawley Gabriel Horner Daniel Compton Lee Hinman Chris Truter Jürgen Hötzel Gary Fredericks Joe Gallo

Packages Referencing this Repo

cc.cosin.tools/leiningen-core
Library for core functionality of Leiningen.
Latest release 2.6.2-SNAPSHOT - Published - 6.35K stars
leiningen
Automate Clojure projects without setting your hair on fire.
Latest release 2.8.1 - Published - 6.35K stars
com.novemberain/leiningen
Automate Clojure projects without setting your hair on fire.
Latest release 1.6.2-SNAPSHOT - Published - 6.35K stars
backtype/leiningen
Automate Clojure projects without setting your hair on fire.
Latest release 1.6.2-SNAPSHOT - Published - 6.35K stars
leiningen-core
Library for core functionality of Leiningen.
Latest release 2.9.0 - Updated - 6.35K stars
leiningen
Automate Clojure projects without setting your hair on fire.
Latest release 2.9.1 - Updated - 6.35K stars
jark/leiningen
Automate Clojure projects without setting your hair on fire.
Latest release 2.0.0-SNAPSHOT - Published - 6.35K stars

Recent Tags See all

2.9.1 February 27, 2019
2.9.0 February 11, 2019
2.8.3 December 15, 2018
2.8.2 December 12, 2018
2.8.1 October 27, 2017
2.8.0 October 18, 2017
2.8.0-RC1 September 18, 2017
2.7.1 September 21, 2016
2.7.0 August 24, 2016
2.6.1 February 08, 2016
2.6.0 February 05, 2016
2.5.3 September 21, 2015
2.5.2 August 09, 2015
2.5.1 January 09, 2015
2.5.0 September 15, 2014

Interesting Forks See all

bruceadams/leiningen
Automate Clojure projects without setting your hair on fire.
Clojure - Other - Last pushed - 2 stars
ato/leiningen
A build tool for Clojure designed to not set your hair on fire.
Clojure - EPL-1.0 - Last pushed - 2 stars - 1 forks
bartojs/leiningen
Automate Clojure projects without setting your hair on fire.
Clojure - Other - Last pushed - 2 stars - 1 forks
nellaivijay/leiningen
Automate Clojure projects without setting your hair on fire.
Clojure - Other - Updated - 1 stars
kumarshantanu/leiningen
Automate Clojure projects without setting your hair on fire.
Clojure - Other - Last pushed - 1 stars - 1 forks

Something wrong with this page? Make a suggestion

Last synced: 2019-02-11 01:10:25 UTC

Login to resync this repository