{"_id":"@benmerckx/binwrap","name":"@benmerckx/binwrap","dist-tags":{"latest":"0.2.2"},"versions":{"0.2.2":{"name":"@benmerckx/binwrap","version":"0.2.2","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":"^4.2.0","child-process-promise":"^2.2.1","eslint":"^6.6.0","http-server":"^0.11.1","mocha":"^6.2.2"},"dependencies":{"mustache":"^3.1.0","request":"^2.88.0","request-promise":"^4.2.5","tar":"^5.0.5","unzip-stream":"^0.3.0"},"_id":"@benmerckx/binwrap@0.2.2","gitHead":"6e86211f5500d1c51f638e351056c5fa6e64b757","_nodeVersion":"22.3.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-RJ77QkCgGdMJopX8FMLt7M31A9aeWjlErFMXOq+2vDtLTLbFhYgqLbvnllSeSvLPPz6WyaXAKxOJqVEdl4jqyg==","shasum":"e698aacbdecacea7e0016c822dbae247b1650ccd","tarball":"https://registry.npmjs.org/@benmerckx/binwrap/-/binwrap-0.2.2.tgz","fileCount":11,"unpackedSize":14521,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDU+fd+mO64gbZx/QSv2z6eGqbplp2NfR17YTluMYpHAiBPETi/CJQG4pnF9vcCZndECpzCXnhTAB6RzR+U5rUKJg=="}]},"_npmUser":{"name":"benmerckx","email":"ben@codeurs.be"},"directories":{},"maintainers":[{"name":"benmerckx","email":"ben@codeurs.be"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/binwrap_0.2.2_1732267233155_0.8217493925913104"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-22T09:20:33.054Z","0.2.2":"2024-11-22T09:20:33.422Z","modified":"2024-11-22T09:20:33.667Z"},"maintainers":[{"name":"benmerckx","email":"ben@codeurs.be"}],"description":"Package cross-platform binaries","homepage":"https://github.com/avh4/binwrap#readme","repository":{"type":"git","url":"git+https://github.com/avh4/binwrap.git"},"author":{"name":"Aaron VonderHaar","email":"gruen0aermel@gmail.com"},"bugs":{"url":"https://github.com/avh4/binwrap/issues"},"license":"MIT","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.2\"\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","readmeFilename":"README.md"}