Giter Site home page Giter Site logo

lein-plz's Introduction

lein-plz

A Leiningen plugin for quickly adding dependencies to projects.

# Adding org.clojure/core.async, org.clojure/clojurescript
# and org.clojure/data.json to a Leiningen project.

$ lein plz add core.async cljs data.json

Installation

Add [lein-plz "0.4.0-SNAPSHOT"] to your user profile, as you would with other Leiningen plugins.

;; ~/.lein/profiles.clj without lein-ancient 

{:user {:plugins [[lein-plz "0.4.0-SNAPSHOT"]]}}

However, if you are using lein-ancient, use this instead:

;; ~/.lein/profiles.clj with lein-ancient

{:user {:plugins [[lein-ancient "0.6.5"]
                  [lein-plz "0.4.0-SNAPSHOT" :exclusions [[rewrite-clj] [ancient-clj]]]]}}

Search

lein-plz uses crossclj to fuzzily discover the latest version of the dependency you're attempting to add. This means that:

$ lein plz add data
$ lein plz add data.json
$ lein plz add org.clojure/data.json

are all probably equivalent, although times do change!

Overriding Search

Many major projects have well-known nicknames -- for example, Clojurescript is usually abbreviated as cljs.

You may specify your own nicknames for projects, and they will take precedence over search. lein-plz ships with a collection of reasonable nicknames. To view them, write:

$ lein plz list

the list sub-command takes an optional pattern to filter dependencies.

$ lein plz list org.clojure/

It may be the case that you want to add your own nicknames for dependencies. As an example, lets say these are dependencies you use most often when you are building websites. Create the file ~/.plz/server.edn:

{http-kit                        #{"hkit" "hk"}
 compojure                       #{"cjure" "cpj"}}

and modify your user profile to look something like the following:

{:user {:plugins [[lein-plz "0.4.0-SNAPSHOT"]]}
 :plz  [["/home/edsnowden/.plz/server.edn" :as "server-group"]]}

hk and hkit will now be resolved as http-kit, and cjure and cpj will be resolved as compojure.

Furthermore, you can also write:

$ lein plz add server-group

to add both http-kit and compojure at once.

License

Copyright © 2014 John Walker, @luxbock (Olli Piepponen), @mkremins

Distributed under the Eclipse Public License version 1.0.

lein-plz's People

Contributors

johnwalker avatar mkremins avatar danielsz avatar

Watchers

Michael Rubanov 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.