hvvashistha / npm-copy

A utility to copy packages from one NPM server to another.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm-copy

A utility to copy packages from one NPM server to another.

build status npm version MIT license we're hiring

We wrote this while migrating from Nodejitsu's (deprecated) private NPM service to our own deployment of Sinopia. For the list of modules you provide, it will find all of the published versions on the from repository, and publish them on the to repository. It's that easy. It's also idempotent and prints a warning if a particular version already exists on the to repo.

Usage

The example should explain things. We accept either token auth or username/password auth.

npm install -g npm-copy
npm-copy --from https://old.npm.mycorp.com --from-token foo --to https://new.npm.mycorp.com --to-username bob --to-password secret --to-email my@corp.com module-1 module-2
  • Module argument can simply be the actual module names in which case all versions will be copied over.
  • If module is a JSON string like '{"module-1": ["v2", "v3"]}' only the listed versions will be copied over.
  • You can mix and match the two types of module arguments above.

Cross Publishing?

Use --to-git-repo TARGET-PACKAGE-REPO.

DISCLAIMER: Use this at your own peril. We deny all copyrights and security violations due to misuse of this command.

Contributing

Please follow our Code of Conduct when contributing to this project.

$ git clone https://github.com/goodeggs/npm-copy && cd npm-copy
$ npm install
$ npm test

Module scaffold generated by generator-goodeggs-npm.

About

A utility to copy packages from one NPM server to another.

License:MIT License


Languages

Language:CoffeeScript 92.8%Language:JavaScript 7.2%