Thanks for highlighting this use case. I have done this in the past but seemed to run into issues with the linking. Maybe I should give it another go though as does save a few steps.
However, I still like the additional confidence of working off the same item that will actually end up in npm.
I didn't know about this method, I always use npm link.
For developing this is very handy as it is also possible to get autorefresh/hmr
For testing a package before publishing using npm pack seems like a much better alternative because npm link does not care about the files property. All files in the project are included as it is just a symlink.
And I just found out that this should work as well:
npm install https://github.com/username/repo.git
Thanks for sharing!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for highlighting this use case. I have done this in the past but seemed to run into issues with the linking. Maybe I should give it another go though as does save a few steps.
However, I still like the additional confidence of working off the same item that will actually end up in npm.
I didn't know about this method, I always use
npm link
.For developing this is very handy as it is also possible to get autorefresh/hmr
For testing a package before publishing using
npm pack
seems like a much better alternative becausenpm link
does not care about the files property. All files in the project are included as it is just a symlink.And I just found out that this should work as well:
Thanks for sharing!