rename-js-moduledeprecated

Rename a JS module and refactor all import statements referencing it.

Usage no npm install needed!

<script type="module">
  import renameJsModule from 'https://cdn.skypack.dev/rename-js-module';
</script>

README

rename-js-module

This is a simple, bare-bones command line script for renaming a JS module's filename and refactoring import statements referencing it to use the new filename. It's a wrapper around jscodeshift and refactoring-codemods's import-declaration-transform codemod.

Installation

npm install --global rename-js-module

Usage

rename-js-module srcDir srcDir/path/to/currentFileName.js srcDir/path/to/newFileName.js