privatenumber / pkgroll

📦 Zero-config package bundler for Node.js + TypeScript
MIT License
1.24k stars 30 forks source link

Include LICENSE files from the bundled packages #97

Open abdala opened 1 month ago

abdala commented 1 month ago

Feature request

Fist of all, thank you for your amazing work. Second, if that is something you would like to have, I would love to help.

When we use node_modules (most of the times) the LICENSE file is included there, but when you bundle everything in one file all the LICENSES are gone.

I was thinking that maybe that would be a nice feature, include all LICENSE files from the bundled devDependencies

Motivations

Follow the licenses requirement about the code included in your package

Alternatives

No response

Additional context

No response

Bugs are expected to be fixed by those affected by it

Compensating engineering work financially will speed up resolution

privatenumber commented 1 month ago

Great idea!

I think we can add a --license flag to enable this.

I haven't really looked into this, but here are some good references:

prisis commented 1 month ago

If you like you could take a look on https://github.com/visulima/packem/blob/main/packages/packem/src/rollup/plugins/license.ts

It does what you would like to have, it use marker in the file that you provide as a licence