Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/meir017/node-tgz-downloader

Downloads all of the node_modules tgz files based on a package-lock.json / pacakge.json file
https://github.com/meir017/node-tgz-downloader

npm npm-scripts tgz verdaccio

Last synced: about 1 month ago
JSON representation

Downloads all of the node_modules tgz files based on a package-lock.json / pacakge.json file

Awesome Lists containing this project

README

        

[![Node.js CI](https://github.com/Meir017/node-tgz-downloader/actions/workflows/test.yml/badge.svg)](https://github.com/Meir017/node-tgz-downloader/actions/workflows/test.yml)
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]

# node-tgz-downloader
Downloads all of the tarballs based on one of the following:

- local `package-lock.json` file
- url to a `package-lock.json`
- name of package
- local `package.json` file
- url to a `package.json`
- search keyword

## install

```bash
npm install node-tgz-downloader -g
```

## usage

### From Code:

```js
const downloader = require('node-tgz-downloader');

downloader.downloadFromPackageLock('path/to/package-lock');
```

### From Command Line:

#### package-lock.json

from local file:

```bash
download-tgz package-lock path/to/package-lock.json
```

from url:

```bash
download-tgz package-lock https://raw.githubusercontent.com/Meir017/node-tgz-downloader/master/package-lock.json
```

#### package name

```base
download-tgz package @angular/cli --devDependencies --peerDependencies
```

#### package.json

from local file:

```bash
download-tgz package-json path/to/package.json
```

from url:

```bash
download-tgz package-json https://raw.githubusercontent.com/Meir017/node-tgz-downloader/master/package.json
```

#### search keyword

downloads the packages returned from an npm search query (https://registry.npmjs.org/-/v1/search?)

```base
download-tgz search tgz
```

[npm-image]: https://img.shields.io/npm/v/node-tgz-downloader.svg
[npm-url]: https://npmjs.org/package/node-tgz-downloader
[downloads-image]: https://img.shields.io/npm/dm/node-tgz-downloader.svg
[downloads-url]: https://npmjs.org/package/node-tgz-downloader

### HttpsAgent Configuration

The tool supports the **https_proxy** environment variable.
Do not forget to specify protocol and port.

```bash
export https_proxy='https://proxy_url:port'
```