mwittig / npm-license-crawler

Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
BSD 3-Clause "New" or "Revised" License
233 stars 45 forks source link

Validator #5

Open TheKnarf opened 8 years ago

TheKnarf commented 8 years ago

Would it be possible to have a valid-licenses field in package.json that npm-license-crawler could cross-check with and give me all repos that don't validate. Ex. maybe I only want to accept dependencies with MIT license. So I write the following in my package.json:

{
  "scripts": {
    "validate-license": "npm-license-crawler validate"
  },
  "valid-licenses": ["MIT"]
}

And upon running npm-license-crawler validate (or in this case npm run validate-license) it would spit out only packages not matching my list of valid-licenses.

mwittig commented 8 years ago

Yes, this should be possible and I think it would make license crawler a lot easier to use. I am not sure if I can take this on in the next couple of weeks as I am very busy with other work right now. If you are in the position to contribute or you know someone who is in the position to do so I'll highly appreciate this.