Closed aquarius-wing closed 1 year ago
I understand that this method may seem complex, so here's how I've implemented it:
To ensure the correct functioning of gitpkg, I created aquarius-wing/gh2npm. This allows GitHub subdirectories to be converted into tarball files.
You can now fork the facebook/lexical repository as your own, similar to what I did with aquarius-wing/lexical-for-keepwork.
Following this, you can import your npm repository like so: npm install https://gh2npm.vercel.app/api/aquarius-wing/lexical-for-keepword/packages/lexical-markdown/npm?branch=keepwork-main
.
Note: In the example above, the unique aspect of branch keepwork-main
is that it builds and submits code to GitHub for npm installation.
I hope that the lexical repository can be built separately, because there is such a scenario where I have only modified the @lexical/markdown module. It may take some time for my PR to be approved after I submit it, but I want my project to be able to use it now. So at this time, I hope there is some way to support me to npm install a subfolder of a GitHub repository in my own project. The solution I can think of now is gitpkg, but lexical is built as a whole, so I hope lexical can be packaged separately, which may also improve the packaging speed a little.