mozilla-b2g/npm-mirror

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

npm-mirror

Build Status

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.

Notable Caveats
Getting Started
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 Word About Arguments
master

a fully qualified url for the master registry's root

manifests

a comma separated list of fully qualifed filesystem paths to or http urls for manifest files (ie https://npmjs.org/doc/json.html)

hostname

a fully qualifed url at which the mirrored packages will be served

root

a fully qualifed path for where to put downloaded packages

Test Suite

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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.