0.1.0 • Published 8 years ago
start-nrepl v0.1.0
start-nrepl
Starts clojure nrepl for a given path if some enclosing folder contains project.clj
Install
npm install start-nreplUsage
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 fileAPI
startNrepl(path, [includeAlembic])
pathstring, required Any file path within a project. A project root is detected byproject.cljfile.includeAlembicboolean, optional, default:falseWhether to include alembic and its dependencies to classpathreturns a
Promisewhich resolves to object with keysportandprocprocisundefinedif 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.