eugeneware / eugeneware/ffmpeg-static
Proposal: Put the binary under `node_modules/.bin/`
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
This way we could `npm install ffmpeg-static` and we’d be able to `npx ffmpeg`. Also, tools like [execa](https://github.com/sindresorhus/execa/tree/e33135381aac5fc3ea2fb4af3abb4bdae2eada8e#preferlocal) could pick up the binary without even needing to `import ffmpeg from "ffmpeg-static"` (using `preferLocal`).
This could be a backward compatible change as long as `import ffmpeg from "ffmpeg-static"` starts pointing into `node_modules/.bin/`.
I can think of one difficulty: uninstallation must remove the binary from `node_modules/.bin/`. But I believe that shouldn’t be big issue. I’ve done this before for a similar project I maintain using a `preuninstall` npm script (https://github.com/leafac/caddy/blob/92d2aa504c33b20514e64bd7a0e57313951bfb15/package.json#L27 https://github.com/leafac/caddy/blob/92d2aa504c33b20514e64bd7a0e57313951bfb15/scripts.mjs#L36-L43).
What do you think?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.