Liking cljdoc? Tell your friends :D
Clojure only.

nrepl.helpers


load-file-commandclj

(load-file-command f)
(load-file-command f source-root)
(load-file-command code file-path file-name)

(If it is available, sending nrepl.middleware.load-file compatible messages is far preferable.)

Returns a string expression that can be sent to an nREPL session to load the Clojure code in given local file in the remote REPL's environment, preserving debug information (e.g. line numbers, etc).

Typical usage: (nrepl-client-fn {:op "eval" :code (load-file-command "/path/to/clojure/file.clj")})

If appropriate, the source path from which the code is being loaded may be provided as well (suitably trimming the file's path to a relative one when loaded).

The 3-arg variation of this function expects the full source of the file to be loaded, the source-root-relative path of the source file, and the name of the file. e.g.:

(load-file-command "…code here…" "some/ns/name/file.clj" "file.clj")

(If it is available, sending nrepl.middleware.load-file
 compatible messages is far preferable.)

Returns a string expression that can be sent to an nREPL session to
load the Clojure code in given local file in the remote REPL's environment,
preserving debug information (e.g. line numbers, etc).

Typical usage: (nrepl-client-fn
                 {:op "eval" :code
                   (load-file-command "/path/to/clojure/file.clj")})

If appropriate, the source path from which the code is being loaded may
be provided as well (suitably trimming the file's path to a relative one
when loaded).

The 3-arg variation of this function expects the full source of the file to be loaded,
the source-root-relative path of the source file, and the name of the file.  e.g.:

  (load-file-command "…code here…" "some/ns/name/file.clj" "file.clj")
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close