CLI to rename a npm package
$ npm -g install @tiaanduplessis/pkg-rename
# OR
$ yarn global add @tiaanduplessis/pkg-rename
cd
into your package's directory after renaming it. You can then run:
$ pkg-rename old-package-name
# or
$ pkg-rename --old=old-package-name
This will get the latest version of the old package from npm and deprecate this and all previous published versions with a message:
WARNING: This project has been renamed to new-package-name. Install using new-package-name instead.
new-package-name
is retrieved from the closest package.json
You can also publish directly after:
$ pkg-rename old-package-name --publish
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
MIT