{"id":17891400,"url":"https://github.com/alvarolorentedev/any-prebuilt","last_synced_at":"2025-03-22T20:33:09.567Z","repository":{"id":40749879,"uuid":"79906231","full_name":"alvarolorentedev/any-prebuilt","owner":"alvarolorentedev","description":"wrapper for prebuilt packages","archived":false,"fork":false,"pushed_at":"2024-04-08T00:11:42.000Z","size":1611,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-13T19:31:19.497Z","etag":null,"topics":["prebuilt","prebuilt-packages"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvarolorentedev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["kanekotic"],"custom":["https://www.paypal.me/kanekotic/"]}},"created_at":"2017-01-24T11:38:10.000Z","updated_at":"2024-04-15T03:36:06.657Z","dependencies_parsed_at":"2022-08-04T10:30:40.124Z","dependency_job_id":"6cea71cd-e375-4a40-be6d-9aa71364f754","html_url":"https://github.com/alvarolorentedev/any-prebuilt","commit_stats":{"total_commits":458,"total_committers":5,"mean_commits":91.6,"dds":"0.26419213973799127","last_synced_commit":"c1be57347751bcf5805485936740d27b1ebd5581"},"previous_names":["alvarolorentedev/any-prebuilt","kanekotic/any-prebuilt"],"tags_count":224,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarolorentedev%2Fany-prebuilt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarolorentedev%2Fany-prebuilt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarolorentedev%2Fany-prebuilt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarolorentedev%2Fany-prebuilt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvarolorentedev","download_url":"https://codeload.github.com/alvarolorentedev/any-prebuilt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221839168,"owners_count":16889591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prebuilt","prebuilt-packages"],"created_at":"2024-10-28T14:16:52.472Z","updated_at":"2024-10-28T14:16:53.317Z","avatar_url":"https://github.com/alvarolorentedev.png","language":"JavaScript","funding_links":["https://github.com/sponsors/kanekotic","https://www.paypal.me/kanekotic/"],"categories":[],"sub_categories":[],"readme":"# ![logomakr_3dkn9b](https://cloud.githubusercontent.com/assets/3071208/22477192/c7ce1d86-e7aa-11e6-87de-c24336e1ea3e.png)\n[![Build Status](https://travis-ci.org/kanekotic/any-prebuilt.svg?branch=master)](https://travis-ci.org/kanekotic/any-prebuilt)\n[![codecov](https://codecov.io/gh/kanekotic/any-prebuilt/branch/master/graph/badge.svg)](https://codecov.io/gh/kanekotic/any-prebuilt)\n[![npm](https://img.shields.io/npm/dt/any-prebuilt.svg)](https://github.com/kanekotic/any-prebuilt)\n[![GitHub license](https://img.shields.io/github/license/kanekotic/any-prebuilt.svg)](https://github.com/kanekotic/any-prebuilt/blob/master/LICENSE)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/kanekotic/any-prebuilt/graphs/commit-activity)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/kanekotic/)\n\n# Mission\nEasy generator or integration of prebuilt packages for use with `npm` or `yarn`. It helps fetchs prebuilt binaries from github releases that will be bind as part of your package.\n\n# Generate a prebuilt package\n\n1. Create new project\n```\nnpm init\n```\n2. Add this package as dependency\n```\nnpm install any-prebuilt --save\n```\n3. Create `postinstall.js` file with content:\n```js\nrequire('any-prebuilt').install(require('./package.json').prebuilt)\n```\n4. Create `index.js` file with content:\n```js\nvar anyPrebuilt = require('any-prebuilt')\nanyPrebuilt.initialize(__dirname, require('./package.json').prebuilt)\nmodule.exports.path = anyPrebuilt.path\n```\n5. On the `package.json` add a prebuilt element (you can also add this to any other file that provides a jason object to both index and postinstall.js).\n```\n  \"prebuilt\": {\n    \"arch\": \u003cstring\u003e, // Target architecture (supported: `ia32` / `x64`. Default value: machine's architecture)\n    \"platform\": \u003cstring\u003e, //Target platform (supported: `win` / `osx` / `linux`. Default value: machine's platform)\n    \"version\": \u003cstring\u003e, //Target version (format: `vX.Y.Z`. Default value: latest)\n    \"targetDir\": \u003cstring\u003e, //Target directory (where to install the binaries. Default value: `./bin`)\n    \"targetBin\": \u003cstring\u003e, //Target binary (the precompiled binary to be required in node. No default value)\n    \"user\": \u003cstring\u003e, // user or Organization (format: string. Is `required`)\n    \"repo\": \u003cstring\u003e, //Origin repo (format: string. Is `required`)\n    \"token\": \u003cstring\u003e //Github token (format: string. `required` if private repo)\n  }\n```\n6. In your `package .json` add the next script:\n```\n\"scripts\": {\n    \"postinstall\": \"node postinstall.js\"\n  }\n```\n\nAs seen before this can be configured using a json object but also can be configured or overrided using the next enviroment variables `PREBUILT_ARCH`, `PREBUILT_PLATFORM`, `PREBUILT_VERSION`, `PREBUILT_BINARY`, `PREBUILT_TOKEN`, `PREBUILT_REPO`, `PREBUILT_USER` and `PREBUILT_TARGET_DIR` environment variables.\n\n### Logo\nHours graphic by \u003ca href=\"http://www.flaticon.com/authors/freepik\"\u003eFreepik\u003c/a\u003e from \u003ca href=\"http://www.flaticon.com/\"\u003eFlaticon\u003c/a\u003e is licensed under \u003ca href=\"http://creativecommons.org/licenses/by/3.0/\" title=\"Creative Commons BY 3.0\"\u003eCC BY 3.0\u003c/a\u003e. Made with \u003ca href=\"http://logomakr.com\" title=\"Logo Maker\"\u003eLogo Maker\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarolorentedev%2Fany-prebuilt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvarolorentedev%2Fany-prebuilt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarolorentedev%2Fany-prebuilt/lists"}