bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.05k stars 439 forks source link

Clone tinycolor.js to mod.js to preserve history and prep for ESM migration #243

Closed bgrins closed 1 year ago

bgrins commented 1 year ago

Would be nice to just convert tinycolor.js directly into an ESM but I'm worried that will break existing users that are relying on a CDN for the UMD exported file. So this change just did a git mv tinycolor.js mod.js and then another commit to restore the content of tinycolor.js.

My plan is that tinycolor.js will become an autogenerated file with UMD exports, and mod.js will become the source of truth as the package moves to use ESM by default. Doing this as a separate step to make the migration to ESM and publishing both versions to node a simpler change - and without needing to worry about if git history is going to be lost during squashing etc.