{"name":"download-tarball","version":"1.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":"babel-tape-runner test.js && semistandard | snazzy","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","package-json-to-readme":"^1.5.1","semistandard":"^8.0.0","snazzy":"^4.0.0","tapava":"^2.2.0","tar-stream":"^1.5.2","then-fs":"^2.0.0","tmp":"0.0.28"},"dependencies":{"bluebird":"^3.4.1","end-of-stream":"^1.1.0","got":"^6.3.0","gunzip-maybe":"^1.3.1","tar-fs":"^1.13.0"},"gitHead":"c57fb3934cde5e94e0e00924204d5e27e84e478f","_id":"download-tarball@1.0.0","_shasum":"74d81a82584062d70bb5cd8f61844d329e621ad7","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"kesla","email":"david.bjorklund@gmail.com"},"dist":{"shasum":"74d81a82584062d70bb5cd8f61844d329e621ad7","tarball":"http://registry-npm.ywwl.com/download-tarball/download/download-tarball-1.0.0.tgz","integrity":"sha512-u7j4cLuucCFLGLiWoWYUQO8lu46xoxe4tJFoESi7e16XHpDLYvCdF41qa2EnEWObTBJE1RVYVmdZfMcEXCqpow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtSYMpdt6RUd98M0jmG72BSIfcILz0X9iao/GEMFL9HAiBXSdfSiXSlKFD84yExuPdUsNpDSZw5OAALIX9iavJfzg=="}],"size":3816,"noattachment":false,"key":"/download-tarball/-/download-tarball-1.0.0.tgz"},"maintainers":[{"name":"kesla","email":"david.bjorklund@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/download-tarball-1.0.0.tgz_1468433700646_0.21139881038106978"},"directories":{},"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":1468433703108,"_cnpm_publish_time":1468433703108,"dist-tags":{"latest":"2.0.0"}}