Skip to content
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

A few Package.json things #5

Open
soluml opened this issue May 5, 2020 · 4 comments
Open

A few Package.json things #5

soluml opened this issue May 5, 2020 · 4 comments

Comments

@soluml
Copy link

soluml commented May 5, 2020

Great work! Noticed just a few things with the package.json as I was looking at source:

L5:

  • Main should probably point to a processed CJS/UMD file. As it is now, this is pointing to the source file and the min'd file is only minified, it's still using ES6 exports.

  • You can add a module field to the package.json on L6 and then point it at your minified module. The module field identifies the file as as a ES module vs. a Common JS module.

L28: Should this be ISC? Isn't this repo Creative Commons? I'm not a licensing guru but I'm guessing this was just missed.

@Heydon
Copy link
Owner

Heydon commented May 5, 2020

Hi @soluml. Any browser that supports ResizeObserver and custom elements also supports ES6 imports, so I don't think I will be transpiling the code. But perhaps I should note that in the README more clearly? I should link to the minified file instead, though, I guess.

I don't know anything about licensing either. The ISC license is very permissive, so I don't think it would cause anyone any problems?

@soluml
Copy link
Author

soluml commented May 5, 2020

@Heydon I guess I was thinking more in terms of a node ecosystem. If they're requiring this module, some bundlers may expect a CJS module vs. an ES module. Specifying the file in the module field tells the bundler that this is an ES6 import. If this isn't being used within NPM or a bundler, then I guess it doesn't matter :)

For the license, I just saw that the license file in the root was Creative Commons but the Package.json said this package was ISC. I assumed they should both be one or the other? But I didn't know if they should specifically be different. I don't think either will cause anyone any problems 👍

@Heydon
Copy link
Owner

Heydon commented May 5, 2020

@soluml Okay, I'll have a think. I very much appreciate the help.

@soluml
Copy link
Author

soluml commented May 5, 2020

Sure, np, really like the component!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants