Liking cljdoc? Tell your friends :D

mranderson.move

Refactoring tool to move a Clojure namespace from one name/file to another, and update all references to that namespace in your other Clojure source files.

WARNING: This code is ALPHA and subject to change. It also modifies and deletes your source files! Make sure you have a backup or version control.

DISCLAIMER This is a heavily modified version of Stuart Sierra's original clojure.tools.namespace.move

Refactoring tool to move a Clojure namespace from one name/file to
another, and update all references to that namespace in your other
Clojure source files.

WARNING: This code is ALPHA and subject to change. It also modifies
and deletes your source files! Make sure you have a backup or
version control.

DISCLAIMER
This is a heavily modified version of Stuart Sierra's original clojure.tools.namespace.move
raw docstring

move-nsclj

(move-ns old-sym new-sym source-path extension dirs watermark)

ALPHA: subject to change. Moves the .clj or .cljc source file (found relative to source-path) for the namespace named old-sym to new-sym and replace all occurrences of the old name with the new name in all Clojure source files found in dirs.

This is partly textual transformation. It works on namespaces require'd or use'd from a prefix list.

WARNING: This function modifies and deletes your source files! Make sure you have a backup or version control.

ALPHA: subject to change. Moves the .clj or .cljc source file (found relative
to source-path) for the namespace named old-sym to new-sym and
replace all occurrences of the old name with the new name in all
Clojure source files found in dirs.

This is partly textual transformation. It works on
namespaces require'd or use'd from a prefix list.

WARNING: This function modifies and deletes your source files! Make
sure you have a backup or version control.
sourceraw docstring

move-ns-fileclj

(move-ns-file old-sym new-sym extension source-path)

ALPHA: subject to change. Moves the .clj or .cljc source file (found relative to source-path) for the namespace named old-sym to a file for a namespace named new-sym.

WARNING: This function moves and deletes your source files! Make sure you have a backup or version control.

ALPHA: subject to change. Moves the .clj or .cljc source file (found relative
to source-path) for the namespace named old-sym to a file for a
namespace named new-sym.

WARNING: This function moves and deletes your source files! Make
sure you have a backup or version control.
sourceraw docstring

ns-form-placeholderclj

source

replace-ns-symbolclj

(replace-ns-symbol content
                   old-sym
                   new-sym
                   watermark
                   extension-of-moved
                   file-ext)

ALPHA: subject to change. Given Clojure source as a file, replaces all occurrences of the namespace name old-sym with new-sym and returns modified source as a string.

Splits the source file, parses the ns macro if found to do all the necessary transformations. Works on the body of namespace as text as simpler transformations are needed. When done puts the ns form and body back together.

ALPHA: subject to change. Given Clojure source as a file, replaces
all occurrences of the namespace name old-sym with new-sym and
returns modified source as a string.

Splits the source file, parses the ns macro if found to do all the necessary
transformations. Works on the body of namespace as text as simpler transformations
are needed. When done puts the ns form and body back together.
sourceraw docstring

replace-ns-symbol-in-source-filesclj

(replace-ns-symbol-in-source-files old-sym new-sym extension dirs watermark)

Replaces all occurrences of the old name with the new name in all Clojure source files found in dirs.

Replaces all occurrences of the old name with the new name in
all Clojure source files found in dirs.
sourceraw docstring

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

× close