/pkg-rename

CLI to quickly rename a npm package

Primary LanguageJavaScriptMIT LicenseMIT

@tiaanduplessis/pkg-rename

package version package downloads standard-readme compliant package license make a pull request Greenkeeper badge

CLI to rename a npm package

Table of Contents

Install

$ npm -g install @tiaanduplessis/pkg-rename
# OR
$ yarn global add @tiaanduplessis/pkg-rename

Usage

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

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature'
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT