Ovyerus / license

Easily generate licenses for your projects!
MIT License
35 stars 5 forks source link

Checking license of other package/repository #1

Open Ovyerus opened 4 years ago

Ovyerus commented 4 years ago

There's several other packages available that allow trying to find the license of a particular npm package or git repository. It might be cool to integrate something similar into license to help make it an all-in-one experience.

Usage could look something like license check [@scope/]package for checking an npm package, and license check user/repo for checking a GitHub repository. Ideally would also want to support any other Git provider without needing to be locked into just GitHub, via just a url I presume.
(Note to self: research to see if we can get info about a remote repo through Git without needing to locally clone it, would probably help with performance in this respect)

Idea

Also add a flag to try and check the compatibility of a package's license with another license, would be useful for companies or individuals who need to ensure that dependencies are compatible with a specific license - e.g. GPL.

Would probably be named something along the lines of --check-compatibility or --compatibility-with, e.g. license check MIT --compatibility-with GPL (and add a shorthand of course, -c).


Also expose it as through the API like with getLicense so users don't need to install an extra package.