Coder Social home page Coder Social logo

vemv / leiningen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from technomancy/leiningen

0.0 0.0 0.0 6.93 MB

Automate Clojure projects without setting your hair on fire.

Home Page: https://leiningen.org

License: Other

Shell 3.89% Clojure 87.76% Emacs Lisp 0.51% Java 0.05% Batchfile 2.21% PowerShell 1.03% HTML 2.23% CSS 2.31% Makefile 0.01%

leiningen's Introduction

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-2021 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 4.0. Full-size version available.

leiningen's People

Contributors

ato avatar bbatsov avatar bruceadams avatar cemerick avatar cldwalker avatar crisptrutski avatar dakrone avatar danielcompton avatar danlarkin avatar davidsantiago avatar gfredericks avatar glts avatar hugoduncan avatar hypirion avatar jcrossley3 avatar joegallo avatar juergenhoetzel avatar kaznak avatar michaelklishin avatar michalmarczyk avatar mpblair avatar mtyaka avatar ninjudd avatar raynes avatar scgilardi avatar technomancy avatar tobias avatar trptcolin avatar winks avatar xeqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.