Git Product home page Git Product logo

nrebl.middleware's Introduction

nrebl.middleware

Clojars Project

VERY ALPHA

The start of an nREPL middleware that will spy on an nREPL connection and capture the results of evaluation for browsing in REBL.

NOTE: REBL requires a commercial license if it's to be used for commercial work

Installation (leiningen)

Assuming you're running a recent leiningen (2.8.3) follow the steps:

  1. Install REBL to a known path.
  2. Add the following to your ~/.lein/profiles.clj file in order to configure nrebl as part of your :user profile:
 :nrebl  {:repl-options {:nrepl-middleware [nrebl.middleware/wrap-nrebl]}
         :dependencies [[rickmoynihan/nrebl.middleware "0.2.0"] ;; set this to the latest nrebl version
                        [org.clojure/core.async "0.4.490"]]
         :resource-paths ["/Users/rick/Software/rebl/REBL-0.9.109.jar"] ;; set this to where your REBL jar is installed
         :injections [(require '[cognitect.rebl :as rebl])]
         }

 :user [:nrebl
        ;;:other-tool-profiles...]

NOTE: the above configuration stores all :nrebl config in a single profile which is then merged into the :user profile, which will be available in dev/repl environments. It is usually cleaner to do it this way as it makes it explicit what configuration belongs to each tool.

Usage (lein)

  1. Run lein repl and/or connect to nREPL with your Editor.
  2. Evaluate (rebl/ui) (the :injections should make this available in every namespace)
  3. The REBL UI should appear
  4. Evaluate more forms in the REPL, they should each then appear in REBL.

Installation (tools.deps)

  1. Install clojure
  2. Install REBL to a known path
  3. Setup your deps.edn
{:aliases {:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.4.5"}}}
           :rebl {:extra-deps {
	                  org.clojure/clojure {:mvn/version "1.10.0-RC3"}
                      rickmoynihan/nrebl.middleware {:mvn/version "0.2.0"}
                      org.clojure/core.async {:mvn/version "0.4.490"}
     	              com.cognitect/rebl {:local/root "<PATH-TO-REBL-JAR>/REBL-0.9.108/REBL-0.9.108.jar"}}}
           :cider {,,,} ;; configure cider/nrepl deps here
           }}}}

Usage

clj -A:nrepl:cider:rebl -m nrepl.cmdline --middleware '[nrebl.middleware/wrap-nrebl cider.nrepl/cider-middleware]'

Then connect to your REPL, and run

(cognitect.rebl/ui)

You should now be able to evaluate forms and have REBL capture them.

Help Wanted

There's lots that can be done to improve this. Help & suggestions welcome.

License

Copyright © 2018 Rick Moynihan

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

nrebl.middleware's People

Contributors

cichli avatar rickmoynihan avatar

Watchers

 avatar  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.