jsm

jsmv

replace module requires

Showing:

Popularity

Downloads/wk

13

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

2

Package

Dependencies

9

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

jsmv

Build Status npm install npm version js-standard-style License

replace requires across your codebase

installation

npm install -g jsmv

why

so you can do jsmv old-module.js new-module.js to replace all requires for old-module.js to new-module.js. it will even take care of making sure all of your relative paths are correct!

or even jsmv modules/my-request.js request to replace any require for modules/my-request.js with the actual request module.

usage

jsmv [options] [from] [to]

options are:

  • --from, -f <modulename> Find files that require <modulename>
  • --to, -t <modulename> Rename all matches to <modulename>
  • --require, -R <name> Look for name vs. require
  • --dir, -d <dir> Search javascript files in <dir> (default CWD)
  • --file, -F <file> Only search <file> for relevant modules
  • --recurse, -r Recurse into subdirectories
  • --force In the event of a deep-require, replace the module anyway
  • --forceFull For deep-requires, replace the whole require with [to]
  • --version, -v Print current version
  • --help, -h This thing

if --from and --to are not explicitly declared, the first two non-flag command line options will be used in their place respectively.

license

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial