fix: Don't include unminified p5 lib into build #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[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 fullp5.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 fullp5.js
file and retained the minified version (p5.min.js
) for better performance.package.json
: Updated thecopy:p5
script to use a newcopy-p5.mjs
script for copying the necessaryp5
files, ensuring the minified versions are used.scripts/copy-p5.mjs
: Added a new script to copy the minifiedp5
files fromnode_modules
to thepublic
directory.Code Consistency:
src/lib/iframe-source.ts
: Updated the script source in theiframeSource
function to usep5.min.js
instead of the fullp5.js
file.test/iframe-source.test.ts
: Modified the test to check forp5.min.js
instead ofp5.js
to match the updated script source.