start-nrepl
v0.1.0
Published
Starts clojure nrepl for a given path if some enclosing folder contains project.clj
Downloads
3
Readme
start-nrepl
Starts clojure nrepl for a given path if some enclosing folder contains project.clj
Install
npm install start-nrepl
Usage
startNrepl = require 'start-nrepl'
startNrepl("/Users/foo/clj/src/core.clj").then ({proc, port})->
# now nrepl client can connect to `port`
# proc is undefined if there already was .nrepl-port file
API
startNrepl(path, [includeAlembic])
path
string, required Any file path within a project. A project root is detected byproject.clj
file.includeAlembic
boolean, optional, default:false
Whether to include alembic and its dependencies to classpathreturns a
Promise
which resolves to object with keysport
andproc
proc
isundefined
if nrepl server was already running.
Notes
Always includes compliment:0.3.4 in java classpath
Depends on having lein
in path.
Java classpath is created by running lein classpath
and alembic
dependencies are fetched by running lein deps
.
Todo
If .nrepl-port file already exists we should check that port in that file is responding.