• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.circleci/H12-Nov-2021-5854

.github/ISSUE_TEMPLATE/H12-Nov-2021-5441

bin/H03-May-2022-1,5381,211

doc/H12-Nov-2021-4,5963,536

lein-pprint/H12-Nov-2021-11989

leiningen-core/H12-Nov-2021-5,3104,555

resources/H03-May-2022-6,7605,243

src/leiningen/H12-Nov-2021-4,3453,603

test/H03-May-2022-2,8552,459

test_projects/H03-May-2022-1,4961,297

web/H03-May-2022-764660

.gitattributesH A D12-Nov-202192 32

.gitignoreH A D12-Nov-2021431 3332

CONTRIBUTING.mdH A D12-Nov-20214.2 KiB10277

COPYINGH A D12-Nov-202131.2 KiB600510

NEWS.mdH A D12-Nov-202143 KiB869732

README.mdH A D12-Nov-20215.8 KiB13899

TUTORIAL.mdH A D12-Nov-202196 21

bash_completion.bashH A D12-Nov-20211.5 KiB3933

pcmpl-lein.elH A D12-Nov-20213.3 KiB9546

project.cljH A D12-Nov-20212.6 KiB5133

sample.project.cljH A D12-Nov-202130.7 KiB551191

zsh_completion.zshH A D12-Nov-20212.8 KiB7161

README.md

1# Leiningen
2
3[![CircleCI](https://circleci.com/gh/technomancy/leiningen.svg?style=svg)](https://circleci.com/gh/technomancy/leiningen)
4
5<img src="https://leiningen.org/img/leiningen.jpg"
6 alt="Leiningen logo" title="The man himself" align="right" />
7
8> "Leiningen!" he shouted. "You're insane! They're not creatures you can
9> fight&mdash;they're an elemental&mdash;an 'act of God!' Ten miles long, two
10> miles wide&mdash;ants, nothing but ants! And every single one of them a
11> fiend from hell..."
12> - from [Leiningen Versus the Ants](http://www.classicshorts.com/stories/lvta.html) by Carl Stephenson
13
14Leiningen is for automating Clojure projects without setting your hair on fire.
15
16## Installation
17
18If your preferred
19[package manager](https://github.com/technomancy/leiningen/wiki/Packaging)
20offers a recent version of Leiningen, try that first as long as it has version 2.x.
21
22Leiningen installs itself on the first run of the `lein` shell script; there is no
23separate install script.  Follow these instructions to install Leiningen manually:
24
251. Make sure you have Java installed; OpenJDK version 8 is recommended at this time.
262. [Download the `lein` script from the `stable` branch](https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein)
27 of this project.
283. Place it on your `$PATH`. (`~/bin` is a good choice if it is on your path.)
294. Set it to be executable. (`chmod +x ~/bin/lein`)
305. Run it.
31
32Windows users can use the above script in the Linux subsystem or try
33[the batch file](https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.bat) or
34[Powershell version](https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.ps1)
35instead.
36
37## Basic Usage
38
39The
40[tutorial](https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md)
41has a detailed walk-through of the steps involved in creating a new
42project, but here are the commonly-used tasks:
43
44    $ lein new [TEMPLATE] NAME # generate a new project skeleton
45
46    $ lein test [TESTS] # run the tests in the TESTS namespaces, or all tests
47
48    $ lein repl # launch an interactive REPL session
49
50    $ lein run -m my.namespace # run the -main function of a namespace
51
52    $ lein uberjar # package the project and dependencies as standalone jar
53
54    $ lein deploy clojars # publish the project to Clojars as a library
55
56Use `lein help` to see a complete list. `lein help $TASK` shows the
57usage for a specific task.
58
59You can also chain tasks together in a single command by using the
60`do` task with comma-separated tasks:
61
62    $ lein do clean, test foo.test-core, jar
63
64Most tasks need to be run from somewhere inside a project directory to
65work, but some (`new`, `help`, `search`, `version`, and `repl`) may
66run from anywhere.
67
68## Configuration
69
70The `project.clj` file in the project root should look like this:
71
72```clj
73(defproject myproject "0.5.0-SNAPSHOT"
74  :description "A project for doing things."
75  :license "Eclipse Public License 1.0"
76  :url "http://github.com/technomancy/myproject"
77  :dependencies [[org.clojure/clojure "1.8.0"]]
78  :plugins [[lein-tar "3.2.0"]])
79```
80
81The `lein new` task generates a project skeleton with an appropriate
82starting point from which you can work. See the
83[sample.project.clj](https://github.com/technomancy/leiningen/blob/stable/sample.project.clj)
84file (also available via `lein help sample`) for a detailed listing of
85configuration options.
86
87The `project.clj` file can be customized further with the use of
88[profiles](https://github.com/technomancy/leiningen/blob/stable/doc/PROFILES.md).
89
90## Documentation
91
92Leiningen documentation is organized as a number of guides:
93
94### Usage
95
96 * [Tutorial](https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md) (start here if you are new)
97 * [FAQ](https://github.com/technomancy/leiningen/blob/stable/doc/FAQ.md)
98 * [Profiles](https://github.com/technomancy/leiningen/blob/stable/doc/PROFILES.md)
99 * [Deployment & Distribution of Libraries](https://github.com/technomancy/leiningen/blob/stable/doc/DEPLOY.md)
100 * [Sample project.clj](https://github.com/technomancy/leiningen/blob/stable/sample.project.clj)
101 * [Polyglot (e.g. Clojure/Java) projects](https://github.com/technomancy/leiningen/blob/stable/doc/MIXED_PROJECTS.md)
102
103### Development
104
105* [Writing Plugins](https://github.com/technomancy/leiningen/blob/stable/doc/PLUGINS.md)
106* [Writing Templates](https://github.com/technomancy/leiningen/blob/stable/doc/TEMPLATES.md)
107* [Contributing](https://github.com/technomancy/leiningen/blob/stable/CONTRIBUTING.md)
108* [Building Leiningen](https://github.com/technomancy/leiningen/blob/stable/CONTRIBUTING.md#bootstrapping)
109
110## Plugins
111
112Leiningen supports plugins which may introduce new tasks. See
113[the plugins wiki page](https://github.com/technomancy/leiningen/wiki/Plugins)
114for a full list. If a plugin is needed for successful test or build
115runs, (such as `lein-tar`) then it should be added to `:plugins` in
116project.clj, but if it's for your own convenience (such as
117`lein-pprint`) then it should be added to the `:plugins` list in the
118`:user` profile in `~/.lein/profiles.clj`. See the
119[profiles guide](https://github.com/technomancy/leiningen/blob/stable/doc/PROFILES.md)
120for details on how to add to your `:user` profile. The
121[plugin guide](https://github.com/technomancy/leiningen/blob/stable/doc/PLUGINS.md)
122explains how to write plugins.
123
124## License
125
126Source Copyright © 2009-2021 Phil Hagelberg, Alex Osborne, Dan Larkin, and
127[contributors](https://github.com/technomancy/leiningen/contributors).
128Distributed under the Eclipse Public License, the same as Clojure
129uses. See the file COPYING.
130
131Thanks to Stuart Halloway for Lancet and Tim Dysinger for convincing
132me that good builds are important.
133
134Images Copyright © 2010 Phil Hagelberg. Distributed under the Creative
135Commons Attribution + ShareAlike
136License 4.0. [Full-size version](https://leiningen.org/img/leiningen-full.jpg)
137available.
138