-
Clone the project
[email protected]:author/my-dependency.git
-
Link the local fork into the project
cd ../my-dependency # in package you want to link yarn link cd ../my-project # current project yarn link my-dependency
This will create a symlink named
my-project/node_modules/my-dependency
that links to your local copy of themy-dependency
project.You can see all linked dependencies like this:
find node_modules/ -type l -ls -maxdepth 1
-
Make the desire changes and build the project
git checkout -b fixed-an-issue vim src/faulty_file.ts yarn build # or whatever the build command is
-
Re-build your current project and test the changes
-
Submit a pull request for the dependency
git add . git commit -m “fix: fixed an issue” git push
Created
May 12, 2022 07:21
-
-
Save thmsobrmlr/92cf66a5a490edb58d23ffb4d85f4ad6 to your computer and use it in GitHub Desktop.
How to fork a dependency and use it locally in a project
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment