Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Put the binary under node_modules/.bin/ #117

Open
leafac opened this issue Dec 13, 2022 · 0 comments
Open

Proposal: Put the binary under node_modules/.bin/ #117

leafac opened this issue Dec 13, 2022 · 0 comments

Comments

@leafac
Copy link

leafac commented Dec 13, 2022

This way we could npm install ffmpeg-static and we’d be able to npx ffmpeg. Also, tools like execa 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant