{"name":"binwrap","version":"0.2.1","description":"Package cross-platform binaries","main":"index.js","scripts":{"test":"(cd test_app && ./build_packages.sh) && mocha && eslint ."},"repository":{"type":"git","url":"git+https://github.com/avh4/binwrap.git"},"author":{"name":"Aaron VonderHaar","email":"gruen0aermel@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/avh4/binwrap/issues"},"homepage":"https://github.com/avh4/binwrap#readme","bin":{"binwrap-install":"bin/binwrap-install","binwrap-prepare":"bin/binwrap-prepare","binwrap-test":"bin/binwrap-test"},"devDependencies":{"chai":"^3.5.0","child-process-promise":"^2.2.1","eslint":"^3.19.0","http-server":"^0.11.1","mocha":"^5.2.0"},"dependencies":{"mustache":"^2.3.0","request":"^2.87.0","request-promise":"^4.2.0","tar":"^4.4.8","unzip-stream":"^0.3.0"},"gitHead":"9f6efb70e24fc422d3a591f075f06b44c65160df","_id":"binwrap@0.2.1","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"avh4","email":"gruen0aermel@gmail.com"},"dist":{"integrity":"sha512-kILc2+zMfFEv66/NLfO2GIpmWRPE8hL68fv+o5A94OlN9AIIG4zernpgn9bpPAImb5t4QwFxnqAGSyP1+tGKrA==","shasum":"d88467026170cb2776b9d47f002d3b4316aa9a87","tarball":"http://registry-npm.ywwl.com/binwrap/download/binwrap-0.2.1.tgz","fileCount":11,"unpackedSize":13781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc07BICRA9TVsSAnZWagAAfh8QAI7A3TQlynVukuph35sE\nPkHEJT80yYezbpKJjgskSJ1cD7eh2Fsoy61bX/Rkk8uot3iXokxPbSIQcYEr\n8TiXzt4fgXvQ3KQOopLV416PvUScv0WmYVD7+nz3pV7YDURjO798klLzn80c\nCshqj6Jq8hINcKqjh738yaFXbLVeTa1jf9FJQ9u2txVy79m6W8ELGnmLRJlj\nImx8cwfs4jClEiI9OfAyhiBEOiE0TwrtwJn9gkcnpTc+EWb3xOI4hHoLQEz3\nPcT9hpNcNhfSri3Nsym3QA/g1J0DzX38DDvXj5i6qCGDGMNcmM8mm5xYmbIG\nt/Ty1ENkxOKNSC1TU78L5V6cwIzpbVTgD7p5tOzK5kG/CdlbPRJ54jaf5/IR\n1ZT1h5yEVPrSN4HKnuS+JyuSZ2j1lfAOoLeQCtUlvCK4bYFTel/+tvBajDbQ\nWC0+HRm/9lbskQkXQ08HPp7RnwkAvFaQvhqhFAak4bCNPdta712bJf4Lpvsn\nPMqlB6KzMZ7n66tTV4ZgiQ43yT+qNbeUhaGsX6xgfysXpEa4yX+Ps4ijmvUR\n2hXv8VUvZ+4ISQ0ytH2neGlcT9HRwoNfKXkCFxZT45SQanVe/kJXG+WO+iGW\ntSLH5uzP40sBsQrYNx94jpSW5qe8ERQ5zufFiqlTHP/psZVskqLGNTx63DGi\nxJyM\r\n=AcLG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfEN9FHrELk+XF1htWQYJh4ge42oGyMH7t/XmcYZiYqwIgNlPiqP9uDPqHeNwuSM3CmWezB5DZ6WYkXflakjuqNew="}],"size":4124,"noattachment":false,"key":"/binwrap/-/binwrap-0.2.1.tgz"},"maintainers":[{"name":"avh4","email":"gruen0aermel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/binwrap_0.2.1_1557377095716_0.23600138954155736"},"_hasShrinkwrap":false,"readme":"[![Build Status](https://travis-ci.org/avh4/binwrap.svg?branch=master)](https://travis-ci.org/avh4/binwrap) [![npm](https://img.shields.io/npm/v/binwrap.svg)](https://www.npmjs.com/package/binwrap)\n\nThis package helps with distributing binaries via npm.\n\n## Usage\n\nFirst, create your compiled binaries and make them available via HTTPS.\n\nNow create your npm installer: Make a `package.json` that looks like this:\n\n```json\n{\n  \"name\": \"myApp\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Install myApp\",\n  \"preferGlobal\": true,\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"install\": \"binwrap-install\",\n    \"prepare\": \"binwrap-prepare\",\n    \"test\": \"binwrap-test\",\n    \"prepublish\": \"npm test\"\n  },\n  \"license\": \"BSD-3-Clause\",\n  \"files\": [\n    \"index.js\",\n    \"bin\"\n  ],\n  \"bin\": {\n    \"myapp-cli\": \"bin/myapp-cli\"\n  },\n  \"dependencies\": {\n    \"binwrap\": \"^0.2.3\"\n  }\n}\n```\n\nThen create your `index.js` file like this:\n\n```javascript\nvar binwrap = require(\"binwrap\");\nvar path = require(\"path\");\n\nvar packageInfo = require(path.join(__dirname, \"package.json\"));\nvar version = packageInfo.version;\nvar root = \"https://dl.bintray.com/me/myApp/\" + version;\n\nmodule.exports = binwrap({\n  dirname: __dirname,\n  binaries: [\n    \"myapp-cli\"\n  ],\n  urls: {\n    \"darwin-x64\": root + \"/mac-x64.tgz\",\n    \"linux-x64\": root + \"/linux-x64.tgz\",\n    \"win32-x64\": root + \"/win-i386.zip\",\n    \"win32-ia32\": root + \"/win-i386.zip\"\n  }\n});\n```\n\nThen run `npm test` to verify that your packages are published correctly.\n\nFinally, run `npm publish` when you are ready to publish your installer.\n\n\n## Javascript API\n\nJavascript code can get the absolute path to a binary from a package that uses binwrap\nas follows (in this example, \"my-package\" is a published npm package that uses binwrap,\nand has a `my-package-cli` binary):\n\n```js\nconst cliPath = require('my-package').paths['my-package-cli'];\n```\n","publish_time":1557377095861,"_cnpm_publish_time":1557377095861,"dist-tags":{"latest":"0.2.3","rc":"0.2.0-rc2"}}