0.3.2 • Published 1 year ago
binary2npm v0.3.2
binary2npm
Prepare execution script for linking binaries from other tools/languages
Currently supports only GitHub API
Installation
npm install binary2npm
# or
yarn install binary2npm
# or
bun add binary2npm
Environment variables
Name | Description | Required |
---|---|---|
GITHUB_TOKEN | For GitHub API | Yes |
Usage
See example
// postinstall.js
import { prepare } from "binary2npm";
await prepare({
remote: "github",
author: "MyGitHubUser",
repository: "my-repo",
remoteToken: process.env.GITHUB_TOKEN, // To avoid Github API limiting
binary: "my-binary",
});
then add postinstall.js
as hook into your projects scripts, see how it's implemented in Used for CLIs
Used for CLIs
This project was made for first entry but then improved and added support for other ways as well as Windows support added
License
Apache-2.0