Skip to content
This repository has been archived by the owner on Mar 5, 2025. It is now read-only.

Add CDN link #1506

Merged
merged 3 commits into from
Apr 19, 2018
Merged

Add CDN link #1506

merged 3 commits into from
Apr 19, 2018

Conversation

LukasDrgon
Copy link

I added a jsDelivr CDN link to your readme, so that people can use it directly without bower or component. jsDelivr is the fastest open-source CDN and updates automatically from npm.

I also added dist folder to npm so that this continues to work after v1.0.0 is released.

@frozeman
Copy link
Contributor

frozeman commented Apr 12, 2018

This is a nice idea, but would increase the package size for every user by the web3.min.js file. So we would need to find a better way to link to the dist files.
This also needs the link to be updated on every release.

So better link to: https://raw.githubusercontent.com/ethereum/web3.js/develop/dist/web3.min.js

@MartinKolarik
Copy link

@frozeman if you don't want to add dist/ to npm, this could be updated to use GitHub instead: https://cdn.jsdelivr.net/gh/ethereum/[email protected]/dist/web3.min.js, or https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js if you want it to be updated automatically.

That said, I think it's a good practice to ship the dist directory in the npm package.

@frozeman
Copy link
Contributor

But shipping it in NPM grows it by a lot, i would prefer getting it from GitHub. Same for 1.0.
For this link https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js it uses the default branch (develop)?
Better would be here to point to the branch like master here.

@MartinKolarik
Copy link

It uses the latest release: https://github.com/ethereum/web3.js/releases

@frozeman
Copy link
Contributor

frozeman commented Apr 13, 2018

That would be 1.0 version, not 0.20.x

@MartinKolarik
Copy link

Actually it's 0.19 right now because beta releases are not considered when selecting the latest version: https://cdn.jsdelivr.net/gh/ethereum/web3.js/

@frozeman
Copy link
Contributor

And why not 0.20.6? Btw you want to adjust your PR?

@MartinKolarik
Copy link

There isn't a 0.20.6 release on GitHub as far as I can see.

@frozeman
Copy link
Contributor

Youre right i never created a release for that one. Will do.

@frozeman frozeman merged commit f15caf1 into web3:develop Apr 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants