Name: npm-mirror
Owner: Mozilla-B2G
Description: A utility for mirroring a subset of npm packages from another npm registry
Created: 2013-09-26 20:41:20.0
Updated: 2018-01-04 06:28:01.0
Pushed: 2016-04-26 13:20:30.0
Homepage: null
Size: 477
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
npm-mirror is a utility for mirroring a subset of npm packages from another npm registry. It syncs all of the dependencies for a particular node module and writes them to the local filesystem so that a simple webserver can behave like a commonjs compliant package registry.
install -g npm-mirror
G=* npm-mirror \
master http://registry.npmjs.org \
manifests /absolute/path/to/target/package.json,/and/another/package.json \
hostname http://secret-npm-mirror.com \
root /absolute/path/to/download/packages/
tart webserver rooted in packages directory
or example...
server --port 80 --path /absolute/path/to/download/packages/
ive it a whirl
path/to/target
install --registry http://secret-npm-mirror.com
a fully qualified url for the master registry's root
a comma separated list of fully qualifed filesystem paths to or http urls for manifest files (ie https://npmjs.org/doc/json.html)
a fully qualifed url at which the mirrored packages will be served
a fully qualifed path for where to put downloaded packages
make test
runs the test suite. Unit tests live in test/unit
and integration tests live in test/integration
. In order for the integration tests to run successfully, you must be connected to the Internet since packages will be downloaded from http://registry.npmjs.org.