Closed bgrins closed 1 year ago
Will fix #217. It moves the implementation into a mod.js with testing and tooling using Deno (away from Grunt & Qunit). It does keep two UMD files: tinycolor.js and dist/tinycolor-min.js (built via rollup and terser) for backwards compatibilty.
mod.js
tinycolor.js
dist/tinycolor-min.js
Tested a publish with both CJS and ESM to npm from this into a temporary package at https://www.npmjs.com/package/@bgrins/test-tinycolor-esm & https://github.com/bgrins/test-tinycolor-upgrade. It's not quite working yet due to https://github.com/bgrins/TinyColor/blob/bcfcd1d49181a45fab2dd1858ef22890adba1809/npm/script/mod.js#L50 setting exports.default. Since this isn't using any other dependencies it's likely easier to just manage the publish directly and without the tool.
Todo:
Follow ups
mathRound = Math.round
Closing this in favor of #245
Will fix #217. It moves the implementation into a
mod.js
with testing and tooling using Deno (away from Grunt & Qunit). It does keep two UMD files:tinycolor.js
anddist/tinycolor-min.js
(built via rollup and terser) for backwards compatibilty.Tested a publish with both CJS and ESM to npm from this into a temporary package at https://www.npmjs.com/package/@bgrins/test-tinycolor-esm & https://github.com/bgrins/test-tinycolor-upgrade. It's not quite working yet due to https://github.com/bgrins/TinyColor/blob/bcfcd1d49181a45fab2dd1858ef22890adba1809/npm/script/mod.js#L50 setting exports.default. Since this isn't using any other dependencies it's likely easier to just manage the publish directly and without the tool.
Todo:
Follow ups
mathRound = Math.round