• Stars
    star
    314
  • Rank 133,353 (Top 3 %)
  • Language
    Clojure
  • Created over 11 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Leiningen plugin for trying out new libraries

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.

More Repositories

1

conformity

A Clojure/Datomic library for idempotently transacting norms into your database – be they schema, data, or otherwise
Clojure
283
star
2

pedestal-micro

Template for creating micro-services in Pedestal
Clojure
51
star
3

docker-compose-in-depth

Code samples for Stone River E-Learning's "Docker Compose in Depth" course
Shell
34
star
4

pedestal-workshop

Checkpoints and exercises for "Web Apps on a Pedestal"
Clojure
30
star
5

alfred-emoji-characters-workflow

Emoji characters for your face (and Alfred 2)
Ruby
26
star
6

unified_diff

Parse unified diffs in style
Ruby
14
star
7

rouge

Falling block game in Pedestal
CSS
13
star
8

dotfiles

All of my dotfiles
Emacs Lisp
6
star
9

cornice

Experimenting with new pedestal-app as a standalone CLJX library
Clojure
4
star
10

vim-boot

Sort-of functional attempt at porting vim-leiningen to boot. Extreme WIP
Vim Script
3
star
11

botfly

Botfly is a Jabber Bot DSL that lets you write bots with ease. Enjoy, while it's still fresh and VERY ALPHA.
Ruby
3
star
12

faker

A Clojure port of Perl's Data::Faker
Clojure
2
star
13

twitter-sms

Twitter SMS notification for the rest of us
Ruby
2
star
14

codeq.me

Hosted codeq for Clojure projects
Clojure
2
star
15

fuzzy-realty

Fuzzy search for Expert Systems Real Estate site
Ruby
1
star
16

om-next-boot-with-remote

Simple om.next application showing live search against a remote. Built on boot.
Clojure
1
star
17

stretch.js

Stretch your mocha further via JSCheck (with sugar on top).
JavaScript
1
star
18

roge

Rogue-like in Clojure
CSS
1
star
19

docker-on-aws

JavaScript
1
star
20

processing-heatmap

Old repository where I tried writing a process.js heatmap
Java
1
star
21

vimfiles

my personal vimfiles
Vim Script
1
star
22

ClothRed

A HTML-to-Textile parser
Ruby
1
star
23

acts_as_freetaggable

Ruby
1
star
24

tpserver-cpp

Project containing the work I did during my GSoC 2008. This repo is NOT the main repo, see site. My work lies at the URL below.
1
star