Liking cljdoc? Tell your friends :D

kusonga.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

clojure-source-filesclj

(clojure-source-files dirs extension)
source

move-nsclj

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

Moves the .clj, .cljc or .cljs 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(script) 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.

Moves the .clj, .cljc or .cljs 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(script) 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 source-path)
(move-ns-file old-sym new-sym extension source-path)

Moves the .clj, .cljc or .cljs 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.

Moves the .clj, .cljc or .cljs 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

rename-prefixclj

(rename-prefix old-sym-prefix new-sym-prefix dirs)

Moves the .clj, .cljc or .cljs source files (found relative to source-paths in dirs) for namespaces prefixed with old-sym-prefix to namespaces with new-sym prefixes and replace all occurrences of the old name with the new name in all Clojure(script) source files found in dirs.

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

Moves the .clj, .cljc or .cljs source files (found relative
to source-paths in dirs) for namespaces prefixed with old-sym-prefix
to namespaces with new-sym prefixes and
replace all occurrences of the old name with the new name in all
Clojure(script) source files found in dirs.

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

replace-ns-symbolclj

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

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 namepsace as text as simpler transformations are needed. When done puts the ns form and body back together.

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 namepsace 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)

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