Skip to content

Commit c602a4a

Browse files
committedFeb 4, 2021
Document the javascript API that binwrap provides for client packages
1 parent 98a0453 commit c602a4a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎README.md

+11
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,14 @@ module.exports = binwrap({
6262
Then run `npm test` to verify that your packages are published correctly.
6363

6464
Finally, run `npm publish` when you are ready to publish your installer.
65+
66+
67+
## Javascript API
68+
69+
Javascript code can get the absolute path to a binary from a package that uses binwrap
70+
as follows (in this example, "my-package" is a published npm package that uses binwrap,
71+
and has a `my-package-cli` binary):
72+
73+
```js
74+
const cliPath = require('my-package').paths['my-package-cli'];
75+
```

0 commit comments

Comments
 (0)
Please sign in to comment.