fgnass / spin.js

A spinning activity indicator
http://spin.js.org
MIT License
9.3k stars 1.02k forks source link

please make sure newest versions are CDNs. #374

Open gacallea opened 4 years ago

gacallea commented 4 years ago

hi,

first things first: thanks for this great lib! so nimble and simple!

I would love to include it from cdnjs but it's stuck at version 2.3.2 . I don't want to use npm, only the but CDNs have only the older version. I know this may be out of your control, but as the author would be nice to make sure CDNs are aligned with master releases.

please and thank you

WingGithub commented 4 years ago

+1

theodorejb commented 4 years ago

I'm not sure how the old version got on cdnjs in the first place, nor do I know how to update it there.

xtuc commented 4 years ago

in https://github.com/cdnjs/cdnjs you can check the package configuration under ajax/lib/NAME/package.json, and based on https://github.com/cdnjs/cdnjs/blob/master/CONTRIBUTING-WIP.md if that make sense. Also we know that updates via git has some issues, make sure to use update via npm.

joe-oli commented 4 years ago

Even if one does not want to use CDN and downloads js,css directly from the page https://spin.js.org/ the js script causes errors in the console; Please remove the line export { Spinner }; from the webpage release ! I don't mean to be demanding, and I am grateful for the author's work, but it should work out of the box, without a hint that the developer has not tested their own library in CDN mode :-)

theodorejb commented 4 years ago

@joe-oli The website already had a link to the UMD module, but I updated it now to make it more prominent next to the ESM link.

RobJohnston commented 3 years ago

Projects on GitHub can be retrieved via the jsDelivr CDN. For example, https://cdn.jsdelivr.net/gh/fgnass/spin.js@4.1.0/

This project is already on NPM, and anything in NPM is available via the UNPKG CDN. For example, https://unpkg.com/browse/spin.js@4.1.0/

Here's how it could be retrieved via libman for ASP.Net projects (selecting a sub-set of files):

{
  "provider": "unpkg",
  "library": "spin.js@4.1.0",
  "destination": "wwwroot/lib/spin-js/",
  "files": [
    "CHANGELOG.md",
    "LICENSE.md",
    "README.md",
    "spin.css",
    "spin.js" 
  ]
},
PandaWood commented 2 years ago

@joe-oli The website already had a link to the UMD module

I think what @joe-oli is referring to, is even the latest version 4.1.1 eg via this link. Just including this in a browser... in vanilla fashion, immediately gives this error: `Unexpected token 'export' (at spin.min.js:1:2805) ?