kessler / license-report

create a short report about a project's dependencies (license, url etc)
MIT License
234 stars 39 forks source link

Use default config file #102

Closed WuglyakBolgoink closed 2 years ago

WuglyakBolgoink commented 2 years ago

it will be great to use default config file.

example: image

And then anyone can change it, e.g.:

{
  "fields": [
    "name",
    "licenseType",
    "author",
    "link",
    "installedVersion",
  ],
  "output": "html",
  "only": "prod,dev",
  "registry": "http://example.com"
}

currently I need to specify config file manually:

    "build:license-report": "license-report --config=.license-report-config  > ./src/dependencies.html"
BePo65 commented 2 years ago

Oh, i found out that this is a default feature of the rc package that we use to handle the configuration. So just create a file named .license-reportrc in the project root and fill it with the desired options (as json). When you run license-report in the directory of the projects package.json this file will be used for configuration.

BePo65 commented 2 years ago

Solved by pr #106