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

fix: Don't include unminified p5 lib into build #86

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Conversation

ff6347
Copy link
Owner

@ff6347 ff6347 commented Oct 8, 2024

[Copilot Summary]

This pull request includes several changes aimed at optimizing the way the p5.js library is handled in the project. The main updates involve switching from the full p5.js file to the minified version, updating the build and copy scripts, and ensuring consistency across the codebase.

Optimizing p5.js Handling:

  • astro.config.mjs: Commented out the inclusion of the full p5.js file and retained the minified version (p5.min.js) for better performance.
  • package.json: Updated the copy:p5 script to use a new copy-p5.mjs script for copying the necessary p5 files, ensuring the minified versions are used.
  • scripts/copy-p5.mjs: Added a new script to copy the minified p5 files from node_modules to the public directory.

Code Consistency:

  • src/lib/iframe-source.ts: Updated the script source in the iframeSource function to use p5.min.js instead of the full p5.js file.
  • test/iframe-source.test.ts: Modified the test to check for p5.min.js instead of p5.js to match the updated script source.

Copy link

netlify bot commented Oct 8, 2024

Deploy Preview for p5-codesandbox ready!

Name Link
🔨 Latest commit 3b240f1
🔍 Latest deploy log https://app.netlify.com/sites/p5-codesandbox/deploys/6704d80c63f3e6000720656b
😎 Deploy Preview https://deploy-preview-86--p5-codesandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

cloudflare-workers-and-pages bot commented Oct 8, 2024

Deploying p5-code-sandbox with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3b240f1
Status: ✅  Deploy successful!
Preview URL: https://49518c2f.p5-code-sandbox.pages.dev
Branch Preview URL: https://fix-workbox.p5-code-sandbox.pages.dev

View logs

public folder was still cached by workbox
@ff6347 ff6347 merged commit 26f014f into main Oct 8, 2024
8 checks passed
@ff6347 ff6347 deleted the fix/workbox branch October 8, 2024 07:02
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