{"name":"binwrap","version":"0.2.3","description":"Package cross-platform binaries","main":"index.js","scripts":{"test":"(cd test_app && ./build_packages.sh && npm install ../) && 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":"^4.3.0","child-process-promise":"^2.2.1","eslint":"^7.19.0","http-server":"^0.12.3","mocha":"^8.2.1"},"dependencies":{"request":"^2.88.0","tar":"^6.1.0","unzip-stream":"^0.3.1"},"gitHead":"91461778fceb04b8ccda59d0a28eddbec8f423f2","_id":"binwrap@0.2.3","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-N4Pm7iyDEv0BrAMs+dny8WQa+e0nNTdzn2ODkf/MM6XBtKSCxCSUA1ZOQGoc1n7mUqdgOS5pwjsW91rmXVxy2Q==","shasum":"87c4e46fa022e2c78b8380e6dd465973bfc7fbca","tarball":"http://registry-npm.ywwl.com/binwrap/download/binwrap-0.2.3.tgz","fileCount":12,"unpackedSize":14306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHJNsCRA9TVsSAnZWagAAqjIP/3MQ+zOBIUHm+vyZq7pO\nfXjxBw8bLTSEgXWuTKITCrqT2m5V2LvS0iy36PggMFlQ2w2Ty1bLYX8E8lZm\niAIMnmYSNCdMXLYGWtBjnmD51PE/1gmZbVT9QffxQx3T89ibYBFZl6htrbbs\n9Gqxp6o4tV8DW2doC4HcbNe3RXj/My/NgtDSsR7+IrC3oN3mOCy1d3BH9mcI\nACJ/i5V/euCNU5hGPzHH2TtfzI/owlTKlCD/R2Zu1jb8X2K4WBkyVhe2/+3s\nz0N3uRYqmpbHPEnzR5XJyTFmSIpnXeHcanL7WFAhZE4BXGEUjXB7jJTC6ueG\n/qohSK9w3rmcUc/FtQyRZiMOc/GezoFbZjGHjUc03wyg/0FJzElsBn9KA5rO\n5pecUBwsk66jeeod9t5ETdnWDqbHNnstEr/F5LqlT17VZrCByx6UgNuUUjge\n9POIi1Eckz+FPlijk0duo0ZmFPzGfnCL6tIIyqxjT6doKAuMLVSjhGDSKeUj\nsOjrgSV66jePsiB/sbOseiRJzvEsPsTxB1Y2zwA8pCJYQdmNSEd4X0DV0WHM\nxUZcozsTNh1LZvjGxwzI8vM0zQhgTPdJG+gnQOhm+U9Qe8Aedfrtg1aZeJie\n4B02W6iozFqqUtjs09DtHuGGHgoFAdMUyp2ZDcxyzQsB0Ol2lWtxWSe+Rd3Y\nwOq6\r\n=cmhu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwiYU6xRn2miJv8J98ATgD/5uR3i4ue0BPQU0UtvPdagIhAOFxecfBeEoBk4Yr+sz4Xie1XzQYvWfoQ72VOvE2MnNg"}],"size":4441,"noattachment":false,"key":"/binwrap/-/binwrap-0.2.3.tgz"},"_npmUser":{"name":"avh4","email":"gruen0aermel@gmail.com"},"directories":{},"maintainers":[{"name":"avh4","email":"gruen0aermel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/binwrap_0.2.3_1612485484289_0.9400434535414879"},"_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":1612485484443,"_cnpm_publish_time":1612485484443,"dist-tags":{"latest":"0.2.3","rc":"0.2.0-rc2"}}