start-nrepl

0.1.0 • Public • Published

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 by project.clj file.

  • includeAlembic boolean, optional, default: false Whether to include alembic and its dependencies to classpath

  • returns a Promise which resolves to object with keys port and proc proc is undefined 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.

Readme

Keywords

none

Package Sidebar

Install

npm i start-nrepl

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • artarf