website icon indicating copy to clipboard operation
website copied to clipboard

REST API for dl.nwjs.io

Open TheJaredWilcurt opened this issue 10 years ago • 3 comments

If there was a REST route to call that would return a JSON payload of NW.js releases, one could create dynamic code on the website to always point to the correct latest release.

TheJaredWilcurt avatar Dec 02 '15 18:12 TheJaredWilcurt

@TheJaredWilcurt We now have a simple list of latest & stable versions at http://nwjs.io/versions.json.

ghostoy avatar Jan 08 '16 05:01 ghostoy

@ghostoy I've been using that for years but recently found that it would be nice to be able to pull in these versions via npm.

There are repos like node-abi that have hard-coded the NW.js versions into them, and are several years out of date.

Currently the only way to have access to these up-to-date NW.js versions via npm is to do:

npm install --save-dev bower nwjs/website#master

then

const nwVersions = require('nw-version/src/versions.json');

Which installs a ton of unwanted things (node-sass binary is built, coffeescript, react, bower, etc) just to have access to one JSON file.


Suggested Solution:

  1. Create a new repo nwjs/nw-versions
  2. Move the versions.json to that repo
  3. Publish the repo to npm so people can just use npm install nw-versions
  4. Update the website to use this new repo as well, pointing to "nw-versions": "latest" so all builds will still be the same

If you do step 1 and 3, then I'll do step 2 and 4.

TheJaredWilcurt avatar Aug 11 '19 23:08 TheJaredWilcurt

Step 2 done:

  • https://github.com/TheJaredWilcurt/nw-versions

If you create the nwjs/nw-versions repo, then I'll submit a PR against it for the above content.

Then you or @rogerwang can merge it and do the npm publish

TheJaredWilcurt avatar Aug 11 '19 23:08 TheJaredWilcurt