Skip to content

Commit

Permalink
Clarify usage in README
Browse files Browse the repository at this point in the history
Closes #133, closes #134.
  • Loading branch information
vweevers committed Nov 27, 2021
1 parent d8a8c0e commit 8ee70f9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -40,6 +40,18 @@ Use [`prebuild`](https://github.com/prebuild/prebuild) to create and upload preb
}
```

When a consumer then installs your package with npm thus triggering the above install script, `prebuild-install` will download a suitable prebuilt binary, or exit with a non-zero exit code if there is none, which triggers `node-gyp rebuild` in order to build from source.

Options (see below) can be passed to `prebuild-install` like so:

```json
{
"scripts": {
"install": "prebuild-install -r napi || node-gyp rebuild"
}
}
```

### Help

```
Expand Down Expand Up @@ -134,6 +146,14 @@ All prebuilt binaries are cached to minimize traffic. So first `prebuild-install
- `${APP_DATA}/npm-cache/_prebuilds`
- `${HOME}/.npm/_prebuilds`

## Install

With [npm](https://npmjs.org) do:

```
npm install prebuild-install
```

## License

[MIT](./LICENSE)

0 comments on commit 8ee70f9

Please sign in to comment.