New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine with webpack to list only really imported packages #81
Comments
I don't use webpack but from what I know it shouldn't be too hard to write a webpack plugin with this module as the base. I don't think that the logic for that belongs in this module tho. This module doesn't care about your build system, it only cares about the licenses of the modules that's installed :) |
I see, you are right. I quickly checked the source and it seems its not exposing a |
I'd accept a PR to expose the things needed to use for other methods ;) |
There's a plugin which does this for webpack (doesn't depend on this library though): https://github.com/xz64/license-webpack-plugin |
That plugin is pretty weak compared to this library. @davglass are you still open to the idea of exposing another API that's not based on reading a directory from disk? Webpack already has a list of dependencies in memory, we'd just need to get the license for each. |
@unindented I'd be open to it, as long as it doesn't effect the module too much. The parts that come from the disk are for modules that don't include their info in the package.json as they should, so it would still need to scan the disk to get it's data. Now if webpack can give us a list of all the source module directories, then it should be able to "just work" once it has the path info. |
I wonder how this could be combined with webpack (as a preloader?) to only really gather information about packages that are
imported
orrequired
by the app.The text was updated successfully, but these errors were encountered: