npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

package-bundle

v0.5.0

Published

Download npm packages and dependencies as tgz's to then import into package manager or project

Downloads

31

Readme

package-bundle

Build Status NPM version Downloads Dependency Status devDependency Status License

package-bundle allows you to download npm packages in their original tar.gz format including their dependencies, and saves them as an archive in the npm folder structure.

Packages can then be imported into a package manager such as Artifactory, and then used in an offline environment.

Getting Started

Download the package using:

npm install -g package-bundle

Or if using yarn

yarn global add package-bundle

You can then use it by running package-bundle or the alias pb:

package-bundle request

This command will download "request" and all its dependencies and create an archive package-bundle-.tgz containing all the tgz's required.

You can also download multiple packages by passing in a list:

package-bundle request bluebird

If no packages are entered then it will check for a package.json file, and read in the dependencies.

Usage

Usage: package-bundle|pb [packages...] [options]
where <packages> are in the format: [@scope/]<pkg>[@<version>]
If no packages are provided it will check for a package.json

Create a bundle of packages including their dependencies in archive format

Options:

  -V, --version                 output the version number
  -d, --no-dev                  ignore dev dependencies in package.json
  -o, --no-optional             ignore optional dependencies in package.json
  -D, --dev-recursive           include all dev dependencies recursively
  -O, --optional-recursive      include all optional dependencies recursively
  -f, --flat                    save in a flat file structure, instead of individual folders
  -z, --no-archive              leave dependencies in folder, and don't archive
  -x, --no-cache                don't use cache file to avoid repeat downloads
  -F, --out-file <file>         output file name
  -a, --all-versions            download all versions of specified packages
  -A, --all-versions-recursive  download all versions of specified packages and dependencies
  -c, --concurrency <n>         number of requests to make at the same time - default=50
  -r, --registry <registry>     specify a registry
  -p, --proxy <url>             proxy url
  --basic-auth <hash>           Basic auth hash
  --auth-token <token>          Auth token
  --insecure                    ignore TLS (SSL) certificate errors
  -h, --help                    output usage information

Features

  • Download node modules as tgz which can then be imported into package manager or stored in repo
  • Hash check to make sure download is correct
  • Cache previous downloads, so you only download dependencies once
  • Download all package dependencies
  • Maintains npm registry folder structure to upload to package manager
  • Specify version of package
  • Read packages from package.json

Importing into Artifactory

Once you have downloaded the packages you want, you can import the archive into an Artifactory npm repository. To do this, select the deploy option on the repo, and upload the whole archive containing all packages. Select the option to "Deploy as Bundle Artifact", which will keep the folder structure in the archive.

Once this is done, you should now be able to npm install from Artifactory, and it should contain all the dependencies that you just downloaded.

Development

yarn install
yarn start -- --help

To build, run yarn build;