https://github.com/stuk/require-and-replace
Intelligent find and replace for require() calls
https://github.com/stuk/require-and-replace
Last synced: 8 months ago
JSON representation
Intelligent find and replace for require() calls
- Host: GitHub
- URL: https://github.com/stuk/require-and-replace
- Owner: Stuk
- Created: 2014-03-27T23:14:32.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-27T23:19:47.000Z (over 12 years ago)
- Last Synced: 2025-04-07T14:18:23.773Z (about 1 year ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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