Skip to content

Conversation

@vHeemstra
Copy link

Support for copying local binaries before trying the downloads.

Works the same as .src(), except url is a local filepath.
Bin-wrapper now tries the localSrcs first (copying them in place when found) and falls back to downloading srcs on fail.

Reason

Downloading binaries slows down CI scripts significantly and a lot of the packages using bin-wrapper ship with binaries which have already been downloaded and can be used.

Changes

  • Added local file support
  • Updated docs

* Adds support for copying local binaries before trying the downloads.

> Works the same as `.src()`, except url is now a local path.
> Bin-wrapper now first tries the `localSrc`s (copying them in place when found) and falls back to downloading `src`s on fail.
@vHeemstra
Copy link
Author

vHeemstra commented Jan 20, 2023

Note: Travis CI test fail, because current xo and ava are different from originally used ones. To solve this, this would need the PRs updating the code base to be merged.

@bjesuiter
Copy link

@vHeemstra This is cool, bc. I need a similar thing.
I'm behind corporate firewalls and using this bin-wrapper with network access ragens from 'pain' to 'impossible'.
So I'm constantly wrapping binaries I need in npm packages and deploying them to npm.

I've one question regarding your code: Do you really need to copy the dependency?
Since I want to use it with the binaries distributed inside the same package, I would not need them to be copied, as this would only increase the size of my already big package.

What I want to create are basically "offline-installers", where everything is contained in the npm package. (Since these would be cached on our corporate internal Nexus package manager) :D

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

Successfully merging this pull request may close these issues.

2 participants