nodeshift-archived / license-reporter

license-reporter is a tool that gathers licenses for project's dependencies and produces a output in XML, JSON, YAML and HTML format.
Apache License 2.0
13 stars 10 forks source link

Investigate the possibility to remove devDependencies from the full scanned data #241

Closed helio-frota closed 6 years ago

helio-frota commented 6 years ago

Here we are returning all the information about dependencies: https://github.com/bucharest-gold/license-reporter/blob/master/lib/modules/checker.js#L11

And here we are applying a filter to get only the declared dependencies ( Example from console command, need to do the same for report command ) https://github.com/bucharest-gold/license-reporter/blob/master/lib/modules/console.mdl.js#L71

Maybe is possible to use the same approach to remove devDependencies.

https://github.com/bucharest-gold/license-reporter/issues/237#issuecomment-346327247

grdryn commented 6 years ago

I'm trying out a possibility for this, I'll hopefully have a proposal shortly! :)

grdryn commented 6 years ago

@helio-frota Here's what I propose: https://github.com/bucharest-gold/license-reporter/pull/242

helio-frota commented 6 years ago

Good PR and yes, would be great to have production only by default and option to exclude devDependencies as you suggested, to make the usage more clean, instead to almost always add the production-only option.