-
Notifications
You must be signed in to change notification settings - Fork 1.2k
update the script
tag in an example provided by README.md
#421
Conversation
```html | ||
<script type="text/javascript" src="assets/bundled.js"></script> | ||
``` | ||
The last published version of the package becomes available on [npmcdn](https://npmcdn.com/) and thus you may use it as the source: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can link to the latest npmcdn dist version with this I believe [npmcdn](https://npmcdn.com/ipfs@*/dist/)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The homepage of https://npmcdn.com/ currently says the following:
You may also use a tag or version range instead of a fixed version number, or omit the version/tag entirely to use the
latest
tag.
And that's why I've decided to omit the version/tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh cool, omitting the version tag entirely is an easy way to link to the latest dist
https://npmcdn.com/ipfs/dist/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm: do you suggest to link the word “npmcdn” to https://npmcdn.com/ipfs/dist/ instead of the npmcdn's homepage?
Originally I intended to use the examples (<script src="https://npmcdn.com/ipfs/dist/index.min.js">
and <script src="https://npmcdn.com/ipfs/dist/index.js">
below) to explain the script's location but I left the word “npmcdn” to tell the ignorant public what npmcdn is. That's how the README.md of ipfs-api
does it currently, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah exactly, I was just suggesting the link could be directed towards the latest dist instead of the cdn homepage since sometimes I want to download a dist for requiring in my own project structures without relying on npm to be online.
EDIT
A better link would be to a content addressable hash of the dist that was backed by a financially incentivized swarm to keep it alive :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still compelled to keep the hyperlink to https://npmcdn.com/ipfs/dist/ because it's educational and, in fact, that's how I've learnt of npmcdn myself (from a README in another repo).
That's why I've just added yet another hyperlink that leads to https://npmcdn.com/ipfs/dist/ and is titled “available for download” for people ready to download the dist manually.
Other than @nginnever comment LGTM :) |
thank you :) |
Fixes #418.