xz64 / license-webpack-plugin

Outputs licenses from 3rd party libraries to a file
ISC License
165 stars 51 forks source link

Add a regex option to exclude packages from the output #36

Closed johannao76 closed 6 years ago

johannao76 commented 6 years ago

I needed to add this so we can exclude internal packages from the license output. Have not been able to add tests yet due to the issue I reported earlier today. Wanted to send out the PR to get your opinion and see if you agree with the change.

xz64 commented 6 years ago

Since the tests don't work on Windows, do they at least work from WSL? Also if you need a solution immediately, you can do all the package exclusion by customizing the ejs template. In the next major release I am planning to drop the regex way of doing things, and just have a function based approach. Can you refactor so it takes a function which can be used to decide if a package should be excluded?

johannao76 commented 6 years ago

@xz64 : Thanks for the tips! Indeed I am on windows. I was able to get things working for my scenario with the ejs template. However, I still get warnings for the filtered packages since they don't have a license. Would you mind integrating my PR into your new version? It looks like you are working off the dev branch, correct? I was working off of master.

xz64 commented 6 years ago

I have published this feature in license-webpack-plugin@next (v2.0.0-alpha.3) Please try it out. Documentation can be found here: https://github.com/xz64/license-webpack-plugin/tree/dev

xz64 commented 6 years ago

Closing for now since license-webpack-plugin@next has this feature