EqualMa / gitpkg

use a sub directory of a github repo as yarn / npm dependency directly
https://gitpkg.vercel.app
315 stars 19 forks source link

Add support for Gitlab.com #27

Open Shayan-To opened 3 years ago

Shayan-To commented 3 years ago

There are many open source projects hosted at gitlab.com, so it would be very nice to have it supported.

I think the main difficulty supporting it would be that GitLab supports nested groups, so an alternative syntax would be needed to support URLs like this:

https://gitlab.com/<group>/<subgroup>/<project>/-/tree/main/<sub-directory>

Maybe something like this would work: https://gitpkg.now.sh/api/pkg?url=<repo>&subdir=<subdir>