I have two experiments that I’ve created in PsychoPy and both are up and running on Pavlovia in separate repositories. Let’s call them main_exp.js and side_exp.js. I want to incorporate my side_exp into my main_exp such that the participant runs the side_exp first and the main_exp second. Therefore, I want to put both experiments into one repository and integrate them somehow so that running the main_exp.js will call the side_exp.js as well, at the beginning of the script.
I have some knowledge of JS and my first idea was to import all the methods and variables from side_exp.js into main_exp.js and add the methods to the main_exp experiment queue. However, this seems tedious and it will take a while to export + import all methods and variables from side_exp.js (there’s a lot).
Is there an easier way to call the side_exp.js file and run it from the main_exp.js file? Any help is greatly appreciated.