{"name":"download-github-release","version":"0.1.2","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":"^2.1.0"},"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","rimraf":"^2.5.3","should":"^8.2.2"},"gitHead":"c08bdf1eb00ab568947b81a48d5b75bfd5cc780a","homepage":"https://github.com/stephan83/download-github-release#readme","_id":"download-github-release@0.1.2","_shasum":"f58a84652782de667a1d7a2ed47378066b56b145","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"stephan83","email":"stephan.florquin@gmail.com"},"dist":{"shasum":"f58a84652782de667a1d7a2ed47378066b56b145","tarball":"http://registry-npm.ywwl.com/download-github-release/download/download-github-release-0.1.2.tgz","integrity":"sha512-7mYaZWdwWkACVcPO1SHCMLDuGBtXz2vatyEkILJWuDlOEUnZ9qJoExu7WCd+65rQcqrdpdv632b4vudh52F9dA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDx/si2rw8D3ovfPZi9oYrP2nd1rvjZNT6QAL+zSIrUnwIhALEGy4PkPxwpji1nnG2yqacJOD2hnLY4FGWE3F6xxlbE"}],"size":4790,"noattachment":false,"key":"/download-github-release/-/download-github-release-0.1.2.tgz"},"maintainers":[{"name":"stephan83","email":"stephan.florquin@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/download-github-release-0.1.2.tgz_1469968207095_0.8681864989921451"},"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":1469968208865,"_cnpm_publish_time":1469968208865,"dist-tags":{"latest":"0.3.2"}}