{"name":"binwrap","version":"0.1.0","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","files":["bin/binwrap-install","bin/binwrap-test"],"bin":{"binwrap-install":"bin/binwrap-install","binwrap-test":"bin/binwrap-test"},"devDependencies":{"chai":"^3.5.0","child-process-promise":"^2.2.1","eslint":"^3.19.0","http-server":"^0.9.0","mocha":"^3.2.0"},"dependencies":{"request":"^2.81.0","tar":"^2.2.1","then-request":"^2.2.0","unzip":"^0.1.11"},"gitHead":"75534dd800e2db788fd807b59141c0f14cb15b1b","_id":"binwrap@0.1.0","_shasum":"8a0c52f3cf4b8f0de87d9c3c0a636a8b2e43250c","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"avh4","email":"gruen0aermel@gmail.com"},"dist":{"shasum":"8a0c52f3cf4b8f0de87d9c3c0a636a8b2e43250c","tarball":"http://registry-npm.ywwl.com/binwrap/download/binwrap-0.1.0.tgz","integrity":"sha512-Z2yxKy3Y4LpLh8HBaU1gRrAO8ta1TQ9F/A+9Hv/xddIL6IpR2U+3dcgE4fx1rjYGRYkAkMSbLFFQuBwrtIfz+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzrWohEn26b5ovRD9KCuFjk8071F9Gy6PL10cFeQz1iAiEAgQtZQeRq+b7gBmH5zVFDld9Ijl7mrMHWGNpSxPclgXQ="}],"size":1619,"noattachment":false,"key":"/binwrap/-/binwrap-0.1.0.tgz"},"maintainers":[{"name":"avh4","email":"gruen0aermel@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/binwrap-0.1.0.tgz_1491091683735_0.6956396764144301"},"directories":{},"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":1491091685803,"_cnpm_publish_time":1491091685803,"dist-tags":{"latest":"0.2.3","rc":"0.2.0-rc2"}}