Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stuk/require-and-replace

Intelligent find and replace for require() calls
https://github.com/stuk/require-and-replace

Last synced: 6 days ago
JSON representation

Intelligent find and replace for require() calls

Awesome Lists containing this project

README

        

"Intelligent" find and replace for require() calls

## Install

```
npm install -g require-and-replace
```

## Usage

```
require-and-replce
```

Finds all `require()` calls for the given `` module and
replaces them will require() calls for given `` module.

Relative module ids are resolved both when finding and
replacing. For example:

```
require-and-replace ./find ./dir/replace
```

will replace `require('../find')` with `require('./replace')`
in `./dir/example.js`.

## License

BSD