bgrins / TinyColor

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

move CDN asssets into NPM directory #253

Closed bgrins closed 1 year ago

bgrins commented 1 year ago

This will enable links from https://cdn.jsdelivr.net/npm/tinycolor2/ and https://cdnjs.cloudflare.com/ajax/libs/tinycolor/ links to continue to work without needing to update the CDN repos

bgrins commented 1 year ago

Testing this on the beta tag at https://www.npmjs.com/package/tinycolor2/v/1.6.0-beta.2?activeTab=explore.

This allows the metadata at https://github.com/cdnjs/packages/blob/6e424606fecdd872596ebce7021c993628e65f9a/packages/t/tinycolor.json and the CDN links at jsdeliver (https://cdn.jsdelivr.net/npm/tinycolor2@beta/dist/tinycolor-min.js) to still work

bgrins commented 1 year ago

I'd be quite happy to get the built tinycolor.js and dist/tinycolor-min.js out of the root, and this looks like a good solution since my searching around for reference to tinycolor-min.js turn up a number of hits on those CDNs https://www.google.com/search?q=%22dist%2Ftinycolor.min.js%22 and not many hitting github directly

bgrins commented 1 year ago

No hits for either file on raw.githubusercontent.com AFAICT: https://www.google.com/search?q=%22https%3A%2F%2Fraw.githubusercontent.com%2Fbgrins%2FTinyColor%2Fmaster%2Fdist%2Ftinycolor-min.js%22 or https://www.google.com/search?q=%22https%253A%252F%252Fraw.githubusercontent.com%252Fbgrins%252FTinyColor%252Fmaster%252Ftinycolor..js%22

bgrins commented 1 year ago

Once I figure out what to do with https://github.com/bgrins/TinyColor/issues/249 my plan is to merge this and tag a 1.6.0, then confirm both of the CDN links above are working. The challenge with #249 is I've been totally unable to reproduce it. If any others could either reproduce a problem or confirm there are no problems with npm install tinycolor2@beta that would help.