Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: explain how to build cdn js file #11042

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ForestJohnson
Copy link

I was trying to figure out how to re-build the same file that is served from CDNs, and I got confused and tripped over myself on the way. through my own mistakes, I had actually convinced myself that the build script in this repo did not produce the file that the CDN was serving. Nothing in the docs talked about it, so I just assumed it was some "special thing that exists somewhere else."

I am adding this to the docs now so that the next person reading through will be re-assured and hopefully find the right file.

I was trying to figure out how to re-build the same file that is served from CDNs, and I got confused and tripped over myself on the way.  through my own mistakes, I had actually convinced myself that the build script in this repo did not produce the file the the CDN was serving.   Nothing in the docs talked about it, so I just assumed it was some "special thing that exists somewhere else."

I am adding this to the docs now so that the next person reading through will be re-assured and hopefully find the right file.
@kurkle
Copy link
Member

kurkle commented Feb 12, 2023

Not sure if this would be valuable or just confuse people, because I'm not sure it is common to try to reproduce something in cdn. What about NPM etc.

@ForestJohnson
Copy link
Author

ForestJohnson commented Feb 12, 2023

Ok, then how about this? instead of

file you would get from a CDN will be located at ./dist/chart.umd.js

it could say

if you want to include the Chart.js javascript file that you just built directly on an HTML page instead of importing it as a module, use dist/chart.umd.js

I kind of doubt that I'm the only chartjs documentation reader who doesn't know what umd means and doesn't know that I should look for "jsdelivr": "./dist/chart.umd.js", in package.json to learn that

"chart.umd.js is the one you can just plop onto the page in a script tag"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants