{"name":"download-tarball","version":"2.0.0","description":"Download a tarball (optionally gzipped) to a folder & extract it in the process. Uses the wonderful & super quick tar-fs & gunzip-maybe libraries.","main":"dist/index.js","scripts":{"test":"xo && babel-tape-runner test.js","build":"rm -rf dist && mkdir -p dist && babel lib --out-dir dist","watch":"rm -rf dist && mkdir -p dist && babel -w lib --out-dir dist","prepublish":"npm run build","posttest":"readme package.json > readme.md"},"repository":{"type":"git","url":"git+https://github.com/kesla/download-tarball.git"},"author":{"name":"David Björklund","email":"david.bjorklund@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/kesla/download-tarball/issues"},"homepage":"https://github.com/kesla/download-tarball#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.10.4","babel-preset-es2015":"^6.9.0","babel-tape-runner":"^2.0.1","http-test-server":"^1.0.0","package-json-to-readme":"^1.5.1","tapava":"^2.2.0","tar-stream":"^1.5.2","then-fs":"^2.0.0","tmp":"0.0.29","xo":"^0.16.0"},"dependencies":{"got":"^8.3.2","gunzip-maybe":"^1.3.1","object-assign":"^4.1.0","promisify-function":"^1.3.2","pump":"^1.0.1","tar-fs":"^1.13.0"},"xo":{"esnext":true,"space":true},"gitHead":"d84f1afe542c7d2fcf8181657e0fe6754c6ad3f2","_id":"download-tarball@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"kesla","email":"david.bjorklund@gmail.com"},"dist":{"integrity":"sha512-Wo7hQFcmwi/GdngZYE80EpMY4yEKfTLX5aS8Oo6AFHwFwv+Y3gBD5RglzMwkIal0yaGnS/kxGXKFWVNDSH/upg==","shasum":"50cbbc7d819695dea66345086396f39c2ced1422","tarball":"http://registry-npm.ywwl.com/download-tarball/download/download-tarball-2.0.0.tgz","fileCount":9,"unpackedSize":10168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0LMgCRA9TVsSAnZWagAAwgkQAJnsB+ARALa07xXTVtPy\naAymR5z98NRBSn+pnIMPGZ3PXsATThCf/mNSJaAQ5L8ydrCFqR61XO7OdbSM\nVLicA7834UU3Jr53mFtG/DF3EoTkMVnCrvww2V4hrfv6Xr+mtWN7j/gx68qo\nVd3hCFSOMlFcrDrBhfffU4bQxhKQzn9G/RvbQyn9a024+ZpzhgiZot+Mc5ix\nCa2eskjBV1GaDY8Tn6rLQYJDk1bgcHvdXipPxrDgRDOtA/N689C5C9q4ux/p\nkX1IAywc2FdprIwqwWx9S0l4V0cwoQtN+O363vJH/8BVFwrh+zKAvtWpG6mm\nd1hv64A6pGHB/aJaTEpqDwuahHSIclNsxvrhQvNvid1FTCvnF+7L8PYu3ukm\n7KAS+LfiFDvC2rqrvu6kCylNrmJ1miFiZ7UUGLlQQPfLxGarmfkig0bEpV5g\ncWfzjt8cY113YShHFzVHO3SzSRo8A6eBtMQ2TqW8W7E8t1tnT+oDSroaaJNM\nGRBAiUlQemkZqsYzwawHftCMn8U3Kz0mly7lWQShk/ksLHY9r10KB5fuZytN\nSHJ5fnl5giXQolFCk+Hto9C3s+eNjy7tz0AGVRo4J5NurlEmdCv21lOP6nNi\nqxWai6FKXc697tCuq8ATRRgbt/iO+Jj8dHT6QV/HjQOqPT44k7A9v8KQjnwJ\n/oYC\r\n=HoTf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkgRIROjjRZ6OdDZlDXyFL+umsx2ZTACFnL/N4y+p63gIhAKGEDzRggof1ikNyh80yx9xMWNW5XJ4UcFyqkqv0hp1k"}],"size":3834,"noattachment":false,"key":"/download-tarball/-/download-tarball-2.0.0.tgz"},"maintainers":[{"name":"kesla","email":"david.bjorklund@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/download-tarball_2.0.0_1540403999640_0.518938056509185"},"_hasShrinkwrap":false,"readme":"# download-tarball \n\nDownload a tarball (optionally gzipped) to a folder &amp; extract it in the process. Uses the wonderful &amp; super quick tar-fs &amp; gunzip-maybe libraries.\n\n## Installation\n\nDownload node at [nodejs.org](http://nodejs.org) and install it, if you haven't already.\n\n```sh\nnpm install download-tarball --save\n```\n\n## Usage\n\n```js\n/* eslint-disable import/no-extraneous-dependencies */\n\nimport download from 'download-tarball';\n\ndownload({\n  url: 'http://link-to-tarball/file.tar.gz',\n  dir: '/dir/where/file/will/be/downloaded'\n}).then(() => {\n  console.log('file is now downloaded!');\n}).catch(err => {\n  console.log('oh crap the file could not be downloaded properly');\n  console.log(err);\n});\n\ndownload({\n  url: 'http://link-to-tarball/file.tar.gz',\n  dir: '/dir/where/file/will/be/downloaded',\n  // custom options that will be forwarded to got.stream(..., opts) can also be set\n  gotOpts: {\n    headers: {\n      beep: 'boop'\n    }\n  }\n}).then(() => {\n  console.log('file is now downloaded!');\n}).catch(err => {\n  console.log('oh crap the file could not be downloaded properly');\n  console.log(err);\n});\n\ndownload({\n  // neat, tar files works as well!\n  url: 'http://link-to-tarball/file.tar',\n  dir: '/dir/where/file/will/be/downloaded'\n}).then(() => {\n  console.log('file is now downloaded!');\n}).catch(err => {\n  console.log('oh crap the file could not be downloaded properly');\n  console.log(err);\n});\n\n```\n\n## Tests\n\n```sh\nnpm install\nnpm test\n```\n\n## Dependencies\n\n- [got](https://github.com/sindresorhus/got): Simplified HTTP requests\n- [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe): Transform stream that gunzips its input if it is gzipped and just echoes it if not\n- [object-assign](https://github.com/sindresorhus/object-assign): ES2015 `Object.assign()` ponyfill\n- [promisify-function](https://github.com/jcollado/promisify-function): Turn a callback-style function into a function that returns a promise\n- [pump](https://github.com/mafintosh/pump): pipe streams together and close all of them if one of them closes\n- [tar-fs](https://github.com/mafintosh/tar-fs): filesystem bindings for tar-stream\n\n## Dev Dependencies\n\n- [babel-cli](https://github.com/babel/babel/tree/master/packages): Babel command line.\n- [babel-core](https://github.com/babel/babel/tree/master/packages): Babel compiler core.\n- [babel-preset-es2015](https://github.com/babel/babel/tree/master/packages): Babel preset for all es2015 plugins.\n- [babel-tape-runner](https://github.com/wavded/babel-tape-runner): Babel + Tape for running your ES Next tests\n- [http-test-server](https://github.com/kesla/test-http-server): Create a simple http server for tests\n- [package-json-to-readme](https://github.com/zeke/package-json-to-readme): Generate a README.md from package.json contents\n- [tapava](https://github.com/kesla/tapava): the syntax of ava, run through tape\n- [tar-stream](https://github.com/mafintosh/tar-stream): tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.\n- [then-fs](https://github.com/then/fs): promised FS\n- [tmp](https://github.com/raszi/node-tmp): Temporary file and directory creator\n- [xo](https://github.com/sindresorhus/xo): JavaScript happiness style linter ❤️\n\n\n## License\n\nMIT\n\n_Generated by [package-json-to-readme](https://github.com/zeke/package-json-to-readme)_\n","publish_time":1540403999759,"_cnpm_publish_time":1540403999759,"dist-tags":{"latest":"2.0.0"}}