# link-bin

> Make bin scripts work local npm dependencies

Latest version **2.0.2** (published 2015-03-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install link-bin
pnpm add link-bin
yarn add link-bin
bun add link-bin
```

Provides the command `link-bin`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2015-03-19 |
| First published | 2015-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Mathias Buus |
| Maintainers | mafintosh, maxogden |
| Keywords | npm, install, hook, bin, local |

## Links

- npm: https://www.npmjs.com/package/link-bin
- Repository: https://github.com/mafintosh/link-bin
- Issues: https://github.com/mafintosh/link-bin/issues
- npm.io page: https://npm.io/package/link-bin

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2015-03-19
- 2.0.1 — 2015-03-19
- 2.0.0 — 2015-03-19
- 1.3.0 — 2015-03-19
- 1.2.1 — 2015-03-19
- 1.2.0 — 2015-03-19
- 1.1.0 — 2015-03-19
- 1.0.1 — 2015-03-19
- 1.0.0 — 2015-03-18

## README

# link-bin

Make bin scripts work local npm dependencies.

```
npm install link-bin
```

Should be used as a post-install npm hook

## Usage

Let's say you wanna put the following atom-shell app on npm

``` js
#!/usr/bin/env atom-shell

// this is an atom-shell app that just shows an empty screen
var app = require('app')
var BrowserWindow = require('browser-window')

app.on('ready', function () {
  var win = new BrowserWindow({
    width: 800,
    height: 600,
    show: true
  })
})
```

Luckily [atom-shell](https://github.com/mafintosh/atom-shell) is installable through npm.
If you save the above file as `app.js` you can then create the following `package.json` file

``` json
{
  "name": "my-atom-shell-app",
  "version": "1.0.0",
  "description": "my atom-shell app",
  "bin": "app.js",
  "scripts": {
    "install": "link-bin"
  },
  "dependencies": {
    "atom-shell": "^0.21.3-1",
    "link-bin": "^1.0.0"
  }
}
```

If you publish the above program to npm other people will be able to `npm install -g my-atom-shell-app`
and run `my-atom-shell-app` to execute the atom-shell app (even if they don't have atom-shell installed already)

To test it you can also run `npm install -g .` in the folder where you added the above `app.js` and `package.json` files.

## License

MIT

---
_Source: https://npm.io/package/link-bin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
