p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

Vite is trying to compile the scripts/parsers/in contents

Open davepagurek opened this issue 11 months ago • 5 comments

Most appropriate sections of the p5.js website?

Other (specify if possible)

What is your operating system?

Windows

Web browser and version

N/A

Actual Behavior

When running npm run dev, sometimes we run into Vite errors because it's trying to compile the js code in scripts/parsers/in and you get an error message from the internals of p5.sound. @lukeplowden and I have also found that the time from starting the dev server to being able to load the site is noticeably faster (at least on windows) after deleting the contents of that folder.

Expected Behavior

The scripts/parsers/in folder is mostly just used to produce the reference material. So far, we keep it around based on the assumption that cloning and setting up the main p5.js would be slower if we didn't, but we don't update the website reference all that often (just when a new version is released) compared to how often we make other changes to the site. So maybe it would be best if the reference parser script clears out the scripts/parsers/in folder after it's done? (Possibly scripts/parsers/out too?)

Steps to reproduce

Would you like to work on the issue?

Someone else can take this on if desired!

davepagurek avatar Mar 12 '25 13:03 davepagurek

I would like to work on this issue

kajal-jotwani avatar Mar 12 '25 14:03 kajal-jotwani

Hey @davepagurek I have created the scripts for clearing out src/parsers content and it is working perfectly, npm run build:reference creating the reference files in src\content\reference\en and then deleteing the cloned repo in src/parsers/in and out too my question is that i have created a cleanUpDirectory function in src/scrips/utils.ts , because the cloneLibraryRepo was also present in the utils.ts, is it the right place to setup that function ?

webermayank avatar Mar 15 '25 21:03 webermayank

I think that's fine @webermayank!

davepagurek avatar Mar 17 '25 13:03 davepagurek

Okay i'll do some final tests then raise a PR

webermayank avatar Mar 17 '25 13:03 webermayank

Should this be closed now that the PR is merged @davepagurek ? Or what remains to be done?

ksen0 avatar Mar 25 '25 06:03 ksen0