Allow forge-std to be installed as npm package #322
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's this do?
Adds support for forge-std to be used through a node package manager, via
npm add forge-std
or equivalent (yarn, pnpm, etc)How to install
After this PR is merged:
npm add forge-std
Before this PR is merged:
We've temporarily published the repo as an npm package
forge-std-no-submodules
. To use, just add this to your package.json:No other changes are necessary, importing forge-std should work + look the same. You can nuke your
lib/forge-std
directory and .gitmodules files if you'd like.Rationale
Foundry is such an incredible tool for smart contract devs. It's honestly so far beyond the alternatives, I'm not sure what I'd do without it at this point. Kudos to you and team 👏
Many of us find the git submodule only approach rather frustrating, mainly due to the fact that the vast majority of our contract dependencies are being installed via npm or equivalent.
I'd really like to make the pitch for foundry to switch from git submodules to a node package manager, and can furnish many developer opinions to the matter.
Would you be open to a discussion?