# jsmv

> rename modules in js files

Latest version **2.1.1** (published 2015-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsmv
pnpm add jsmv
yarn add jsmv
bun add jsmv
```

Provides the command `jsmv`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2015-02-22 |
| First published | 2013-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jesse keane |
| Maintainers | jarofghosts |
| Keywords | rename, modules, codebase |

## Links

- npm: https://www.npmjs.com/package/jsmv
- Repository: https://github.com/jarofghosts/jsmv
- Issues: https://github.com/jarofghosts/jsmv/issues
- npm.io page: https://npm.io/package/jsmv

## Dependencies (9)

- [nopt](https://npm.io/package/nopt.md) 2.1.2
- [falafel](https://npm.io/package/falafel.md) 0.3.1
- [through](https://npm.io/package/through.md) 2.3.4
- [ls-stream](https://npm.io/package/ls-stream.md) ^1.0.0
- [quotemeta](https://npm.io/package/quotemeta.md) 0.0.0
- [stream-police](https://npm.io/package/stream-police.md) ^1.0.0
- [dotpath-stream](https://npm.io/package/dotpath-stream.md) 0.0.0
- [single-line-log](https://npm.io/package/single-line-log.md) ^0.4.1
- [cssauron-falafel](https://npm.io/package/cssauron-falafel.md) ^1.2.1

## Recent versions

- 2.1.1 (latest) — 2015-02-22
- 2.1.0 — 2015-02-22
- 2.0.0 — 2015-02-21
- 1.0.1 — 2014-08-08
- 1.0.0 — 2014-08-02
- 0.3.2 — 2014-06-10
- 0.3.1 — 2014-06-10
- 0.3.0 — 2014-06-07
- 0.2.0 — 2014-03-29
- 0.1.4 — 2014-03-08
- 0.1.3 — 2013-12-31
- 0.1.2 — 2013-12-21
- 0.1.1 — 2013-12-20
- 0.1.0 — 2013-12-20
- 0.0.6 — 2013-12-19
- … 6 more at https://npm.io/package/jsmv/versions

## README

jsmv
====

[![Build Status](http://img.shields.io/travis/jarofghosts/jsmv.svg?style=flat)](https://travis-ci.org/jarofghosts/jsmv)
[![npm install](http://img.shields.io/npm/dm/jsmv.svg?style=flat)](https://www.npmjs.org/package/jsmv)

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 `require`s 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

---
_Source: https://npm.io/package/jsmv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
