0.1.8 • Published 7 years ago

replacy v0.1.8

Weekly downloads
2
License
MIT
Repository
-
Last release
7 years ago

replacy

Replace one term with another in a directory, including file names and their contents.

Installation

CLI version

$ npm install replacy -g

For development

$ npm install replacy -s

Usage

CLI

$ replacy {oldExp} {newExp} where: {oldExp} is the expression to be replaced {newExp} is the replacement

$ replacy oldFoo newBar

For development

Functions: rename(path, justFiles, oldExp, newExp) -> renames all files and folders if justFiles=false. Doesn't touches its contents. replaceContent(path, oldExp, newExp) -> replaces oldExp with newExp inside all files. Doesn't changes file names. renameAndReplace(path, oldExp, newExp) -> run all together. Uses 'justFiles' = true to rename

Params: -- justFiles: bool -> true=rename only files; false=include folders -- path: string -> working dir -- oldExp: string -> expression to be replaced -- newExp: string -> replacement

Using: var replacy = require('replacy') replacy.rename('/someDir', true||false, 'oldFoo', 'newBar') replacy.replaceContent('/someDir', 'oldFoo', 'newBar') replacy.renameAndReplace('/someDir', 'oldFoo', 'newBar')

Important

The action is made recursively, the only exception is .git directory. All the rest will be changed (according with the search expression).

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.0

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago