Skip to content

Commit

Permalink
fix: bin is mapped correctly and executable (#145)
Browse files Browse the repository at this point in the history
* fix: bin is mapped correctly and executable

fixes #143

* chore: package-lock.json from main

* fix: actually add the bin files
  • Loading branch information
SgtPooki authored Sep 19, 2024
1 parent 45b33bd commit ca1b2e5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Rust bootstrapper: https://github.com/libp2p/rust-libp2p/tree/master/misc/server
## Start the bootstrapper

```console
$ npx @libp2p/amino-dht-bootstrapper amino
$ npx --package=@libp2p/amino-dht-bootstrapper -- amino
```

```sh
Expand Down
2 changes: 2 additions & 0 deletions bin/amino-health-check.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
import '../dist/src/health-check.js'
2 changes: 2 additions & 0 deletions bin/amino.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
import '../dist/src/index.js'
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
"url": "https://github.com/libp2p/js-libp2p-amino-dht-bootstrapper/issues"
},
"bin": {
"amino": "./dist/src/index.js",
"health-check": "./dist/src/health-check.js"
"amino": "./bin/amino.js",
"health-check": "./bin/amino-health-check.js"
},
"type": "module",
"types": "./dist/src/index.d.ts",
"files": [
"src",
"dist",
"bin",
"!dist/test",
"!**/*.tsbuildinfo"
],
Expand Down
1 change: 0 additions & 1 deletion src/health-check.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#! /usr/bin/env node --trace-warnings
/* eslint-disable no-console */

/**
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#! /usr/bin/env node --trace-warnings
/* eslint-disable no-console */

import { readFile, writeFile } from 'node:fs/promises'
Expand Down

0 comments on commit ca1b2e5

Please sign in to comment.