Skip to content

Commit 8ee70f9

Browse files
committedNov 27, 2021
Clarify usage in README
Closes #133, closes #134.
1 parent d8a8c0e commit 8ee70f9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
 

‎README.md

+20
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ Use [`prebuild`](https://github.com/prebuild/prebuild) to create and upload preb
4040
}
4141
```
4242

43+
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.
44+
45+
Options (see below) can be passed to `prebuild-install` like so:
46+
47+
```json
48+
{
49+
"scripts": {
50+
"install": "prebuild-install -r napi || node-gyp rebuild"
51+
}
52+
}
53+
```
54+
4355
### Help
4456

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

149+
## Install
150+
151+
With [npm](https://npmjs.org) do:
152+
153+
```
154+
npm install prebuild-install
155+
```
156+
137157
## License
138158

139159
[MIT](./LICENSE)

0 commit comments

Comments
 (0)
Please sign in to comment.