{"name":"download-github-release","version":"0.3.1","description":"A node module to download Github release assets. It will also uncompress zip files.","main":"lib/index.js","scripts":{"test":"mocha --compilers js:babel-core/register --recursive --require babel-polyfill --require should","test:cov":"babel-node ./node_modules/isparta/bin/isparta cover ./node_modules/mocha/bin/_mocha -- --recursive --require should --require should","lint":"eslint src test","check":"npm run lint && npm run test","build:lib":"babel src --out-dir lib","clean":"rimraf lib coverage","preversion":"npm run clean && npm run check","version":"npm run build:lib","postversion":"git push && git push --tags && npm run clean","prepublish":"npm run clean && npm run build:lib"},"bin":{"download-github-release":"bin/download-github-release"},"repository":{"type":"git","url":"git+https://github.com/stephan83/download-github-release.git"},"keywords":["github","release","download"],"author":{"name":"Stephan Florquin"},"license":"MIT","bugs":{"url":"https://github.com/stephan83/download-github-release/issues"},"dependencies":{"commander":"^2.9.0","extract-zip":"^1.5.0","gauge":"^2.6.0","multi-progress":"^2.0.0","superagent":"^3.6.2"},"devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-eslint":"^6.1.2","babel-polyfill":"^6.5.0","babel-preset-es2015":"^6.9.0","eslint":"^2.13.1","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.11.1","eslint-plugin-jsx-a11y":"^1.5.5","eslint-plugin-react":"^5.2.2","isparta":"^4.0.0","mocha":"^2.4.5","nock":"^8.0.0","rimraf":"^2.5.3","should":"^8.2.2","sinon":"^1.17.5","stream-buffers":"^3.0.0","tmp":"0.0.28"},"gitHead":"3cc386aa8f23cfb2df64f8021767b18a6550fb51","homepage":"https://github.com/stephan83/download-github-release#readme","_id":"download-github-release@0.3.1","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"stephan83","email":"stephan.florquin@gmail.com"},"dist":{"integrity":"sha512-Lgq1w+crdH8fZo87CyajZSD6OC6O5jytURTmtOG0CLxKKApe6PiSxgxFBM8Qqfyi0Od9a0hlzumphSB5aaWvIA==","shasum":"83b57a315536bd7d78470ade1c63dc7890ab16a6","tarball":"http://registry-npm.ywwl.com/download-github-release/download/download-github-release-0.3.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICxqifWkvP/yyYDelgNUfVX198ygHSQexRYcJLV+iPxOAiEA4rrWQRKegD2guQZV1gswCtsXWadmcsT+fXVQSPOcNy4="}],"size":5046,"noattachment":false,"key":"/download-github-release/-/download-github-release-0.3.1.tgz"},"maintainers":[{"name":"stephan83","email":"stephan.florquin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/download-github-release-0.3.1.tgz_1506934009794_0.08592342608608305"},"directories":{},"readme":"# Download Github Release\n\nA node module to download Github release assets. It will also uncompress zip files.\n\n[![Build Status](https://travis-ci.org/stephan83/download-github-release.svg?branch=master)](https://travis-ci.org/stephan83/download-github-release)\n[![codecov](https://codecov.io/gh/stephan83/download-github-release/branch/master/graph/badge.svg)](https://codecov.io/gh/stephan83/download-github-release)\n[![Build Status](https://david-dm.org/stephan83/download-github-release.svg)](https://david-dm.org/stephan83/download-github-release) \n\n```\n$ download-github-release -s darwin-x64 electron electron\nDownloading electron/electron@v1.3.1...\nelectron-v1.3.1-darwi... ▇▇▇▇▇---------------------------------------------------- 662.8s\nelectron-v1.3.1-darwi... ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇--------- 13.4s\nelectron-v1.3.1-darwi... ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇--- 3.6s\nffmpeg-v1.3.1-darwin-... ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 0.0s\n```\n\nThis is useful for instance if you have a project that depends on binaries released via Github.\n\n## Command line\n\n### Installation\n\n```bash\nnpm install -g download-github-release\n```\n\n### Usage\n\n```\nUsage: download-github-release [options] <user> <repo> [outputdir]\n\nOptions:\n\n  -h, --help             output usage information\n  -V, --version          output the version number\n  -p, --prerelease       download prerelease\n  -s, --search <regexp>  filter assets name\n  -z, --zipped           don't extract zip files\n```\n\n### Example\n\nDownload `electron/electron` assets whose name contains `darwin-x64` to `/tmp`.\n\n```\n$ download-github-release -s darwin-x64 electron electron /tmp\n```\n\n## API\n\n### Installation\n\n```bash\nnpm install --save download-github-release\n```\n\n### Usage\n\n```javascript\nvar downloadRelease = require('download-github-release');\n\nvar user = 'some user';\nvar repo = 'some repo';\nvar outputdir = 'some output directory';\nvar leaveZipped = false;\n\n// Define a function to filter releases.\nfunction filterRelease(release) {\n  // Filter out prereleases.\n  return release.prerelease === false;\n}\n\n// Define a function to filter assets.\nfunction filterAsset(asset) {\n  // Select assets that contain the string 'windows'.\n  return asset.name.indexOf('windows') >= 0;\n}\n\ndownloadRelease(user, repo, outputdir, filterRelease, filterAsset, leaveZipped)\n  .then(function() {\n    console.log('All done!');\n  })\n  .catch(function(err) {\n    console.error(err.message);\n  });\n```\n\n## TODO\n\n- other compression formats\n- option to download specific release instead of latest?\n- option to download source?\n- private repos?\n","publish_time":1506934010758,"_cnpm_publish_time":1506934010758,"dist-tags":{"latest":"0.3.2"}}