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

Always use CDN as JS servers #191

Merged
merged 10 commits into from
Oct 30, 2021
Merged

Always use CDN as JS servers #191

merged 10 commits into from
Oct 30, 2021

Conversation

berinhard
Copy link
Owner

@berinhard berinhard commented Oct 29, 2021

This PR implements some required tooling in order to make #186 PR possible for being fixed and it also changes the default behavior of pyp5js when it comes to static files.

Currently, pyp5js copies a p5.min.js file to the every new sketch's static dir. This wasn't a problem until Pyodide, which has more the 10MB of JS related files. To copy 10MB per sketch would be abusive with our users HDs and thus, from the very beginning, pyp5js used CDN as our pyodide serve. The #186 was created as an alternative to that for the web editor.

During the process I realized that:

  1. CDN should be the default for all the Javascript dependencies;
  2. The user should be able to opt-out CDN usage (pyp5js new --local) too;
  3. The web editor must always use local JS so, that way, people can use pyp5js even without internet access;

This PR implements all the changes on this directions and leave TODO notes to map what should be done when it comes to pyodide local copies.

@berinhard berinhard marked this pull request as draft October 29, 2021 18:46
@berinhard berinhard marked this pull request as ready for review October 29, 2021 18:51
@berinhard berinhard merged commit 9fe3bf2 into develop Oct 30, 2021
@berinhard berinhard deleted the pr186 branch October 30, 2021 13:19
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.

1 participant