watched-box
watched-box copied to clipboard
A few Package.json things
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.
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?
@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 👍
@soluml Okay, I'll have a think. I very much appreciate the help.
Sure, np, really like the component!