-
I needed to modify the video-keyboard-response to allow multiple responses while the video was playing. This went pretty well, but I now have the problem of how to reference this in my project. I don't want to publish it as a proper npm package, since I don't plan to maintain it. I don't want the hassle of setting up and maintaining a private npm host. Using a git url in my package.json file won't work (afaik) because the jsPsych git repo contains all of the plugins. The only option I see is to check out the forked jsPsych repo where I made the changes and then use a file reference to the modified video-keyboard-response in my package.json . I don't love this, because anyone using my code will need to check out both repos and build the entire jsPsych repo. Does anyone have any other suggestions? I'm afraid that the details of JS package management aren't my strong suit, so I'm hoping I've overlooked something. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @noah10 If you modified the .js version you can just directly reference your file in your experiment code with a script tag. If you modified a .ts version that needs to be built you can run If neither sounds good and I've misunderstood the question please let me know! |
Beta Was this translation helpful? Give feedback.
-
Hmmm... I hadn't considered simply grabbing the built js file. (There is no pre-build js version in this case, or if there is I completely overlooked it.) Since it's not minified that seems like a decent solution. Thanks for the suggestion! |
Beta Was this translation helpful? Give feedback.
Hi @noah10
If you modified the .js version you can just directly reference your file in your experiment code with a script tag.
If you modified a .ts version that needs to be built you can run
npm run build
in the package's directory and then grab the js file from the dist folder.If neither sounds good and I've misunderstood the question please let me know!