Leiningen

Leiningen用于自动化Clojure项目,而不会让你无法忍受。(Leiningen is for automating Clojure projects without setting your hair on fire.)

Github星跟蹤圖

Leiningen(发音:LINE-ing-en. ['laɪnɪŋən])是使用Clojure的最简单的方法。 专注于项目自动化和声明性配置,它脱颖而出,让您专注于您的代码。
\r\n

(defproject leiningen.org "1.0.0"\r\n  :description "Generate static HTML for https://leiningen.org"\r\n  :dependencies [[enlive "1.0.1"]\r\n                 [cheshire "4.0.0"]\r\n                 [org.markdownj/markdownj "0.3.0-1.0.2b4"]]\r\n  :main leiningen.web)\r\n

主要指標

概覽
名稱與所有者technomancy/leiningen
主編程語言Clojure
編程語言Shell (語言數: 9)
平台
許可證Other
所有者活动
創建於2009-11-01 05:50:07
推送於2025-04-16 18:59:45
最后一次提交2022-06-15 21:03:55
發布數82
最新版本名稱2.11.2 (發布於 2024-02-13 16:41:31)
第一版名稱0.5.0 (發布於 )
用户参与
星數7.3k
關注者數220
派生數1.6k
提交數5k
已啟用問題?
問題數1919
打開的問題數95
拉請求數746
打開的拉請求數7
關閉的拉請求數151
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Leiningen

CircleCI

"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 
  :plugins )

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.