GithubHelp home page GithubHelp logo

lein-try's Introduction

lein-try Build Status

A Leiningen plugin for trying out Clojure libraries in a REPL without creating a project or adding them to an existing project.

Special thanks to contributors @xsc and @seancorfield for making lein-try amazing.

Usage

Leiningen (via Clojars)

Put the following into the :plugins vector of the :user profile in your ~/.lein/profiles.clj:

;; All alone:
[lein-try "0.4.3"]

;; The whole thing:
{:user {:plugins [[lein-try "0.4.3"]]}}

This plugin requires Leiningen >= 2.1.3.

Command Line

You can use lein-try to open a REPL with any dependencies you specify loaded and ready to use.

$ lein try clj-time "0.5.1"
Fetching dependencies... (takes a while the first time)
lein-try loaded [clj-time "0.5.1"]

nREPL server started on port 57036
REPL-y 0.2.0
Clojure 1.5.1
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)

user=>

You can even leave off the version number and leiningen will pull the most recently released version! (Thanks @xsc.) The command lein try clj-time evaluates as lein try clj-time "RELEASE". Feel free to mix versioned and unversioned dependencies–we're good like that.

$ lein try clj-time
#...
user=>

To see available options, call lein help try:

$ lein help try
Launch REPL with specified dependencies available.

  Usage:

    lein try io.rkn/conformity "0.2.1" com.datomic/datomic-free "0.8.4020.26"
    lein try io.rkn/conformity 0.2.1
    lein try io.rkn/conformity # This uses the most recent version

Arguments: ([& args])

In Emacs

Miss Emacs integration while lein trying? In your *scratch* buffer, set your inferior-lisp-program var...

(setq inferior-lisp-program "lein try tentacles")

and then launch M-x inferior-lisp.

Contributions

Contributions are more than welcome. Fire away in an issue or pull-request.

License

Copyright © 2013 Ryan Neufeld

Distributed under the Eclipse Public License, the same as Clojure.

lein-try's People

Contributors

daemianmack avatar seancorfield avatar xsc avatar

Watchers

 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.