kessler / license-report

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

Markdown output #116

Closed mariusmuntean closed 1 year ago

mariusmuntean commented 1 year ago

Added basic support to output the results as a markdown table. Fixes #115

BePo65 commented 1 year ago

Sorry for the delay, but it's been only today that I finished a quite complex pr for the 'dayjs' package.

Regarding the configuration, I think we could simply add an entry to the config.js e.g. named tablemarkOptions with an empty literal object ({}) as a default value. If not empty, we could add this as a second parameter to the line 109 in lib/getFormatter.js ('return tablemark(dataAsArrayWithRenamedFields)').
By default, does not require any configuration, as it uses the field names as column titles.

What do you think about this?

mariusmuntean commented 1 year ago

I fully agree and I'll update the pr tomorrow or so.

mariusmuntean commented 1 year ago

@BePo65 I've added the tablemark options passthrough. It wasn't necessary to check if the tablemark options object is empty. I've also updated the README.md a bit. What do you think?

BePo65 commented 1 year ago

Thanks for adding the configuration section and especially of thinking of the README.md file.

mariusmuntean commented 1 year ago

I saw the placeholders in the templates initially, but then completely forgot about them.