Giter Club home page Giter Club logo

Comments (7)

kurokida avatar kurokida commented on May 29, 2024 8

Thanks to @bjoluc , I can finally publish the psychophysics plugin on NPM. Sorry for the wait.

You can install it runningnpm install @kurokida/jspsych-psychophysics

You can also see the website:
https://www.npmjs.com/package/@kurokida/jspsych-psychophysics

Best,
Daiichiro

from jspsych-psychophysics.

franfrutos avatar franfrutos commented on May 29, 2024 1

Thank you both!

I have opened an issue in the jspsych-builder repository (bjoluc/jspsych-builder#40). Let's see if the jspsych-builder developers have a simple solution.

from jspsych-psychophysics.

tpronk avatar tpronk commented on May 29, 2024 1

Bueno! I liked it in the hope that I then get notifications when we get any replies :)

from jspsych-psychophysics.

kurokida avatar kurokida commented on May 29, 2024 1

@bjoluc Thank you for the careful explanation. Since I'm not familiar with the ES module and NPM, I can't fully imagine what would be happned if I accept your suggestions. I'm little concerned about changing how to download my plugin. Since my plugin includes the jsPsych itself, the users can run my sample programs just by downloading the plugin from GitHub repository. Introducing the NPM stile might be confuse my plugin users.

But on the other hand, I interested in making my plugin compatible with NPM. So, if you can please make the PR and let me confirm how use of my plugin would be changed.

Best,
Daiichiro

from jspsych-psychophysics.

kurokida avatar kurokida commented on May 29, 2024

Thanks for this post!

Unfortunately, I'm not familliar with the npm at all. But my friend @tpronk might be able to help us.
I hope you don't get your hopes up and wait too long.

from jspsych-psychophysics.

tpronk avatar tpronk commented on May 29, 2024

Hi @franfrutos and @kurokida!

I took a quick peek at jsPsych Builder. I see that besides NPM, it also supports "module-style imports of non-module plugins from @jspsych-contrib". However, the NPM and the contrib approach seem to require that the jspsych-psychophysics plugin is written in ES6, which it currently isn't. Converting the psychophysics plugin to ES6 could be quite project.

However, I'm not very sure of the above, since I'm not very experienced with jsPsych and only found out about that builder half an hour ago. Maybe reach out the builder devs to see what they think?

from jspsych-psychophysics.

bjoluc avatar bjoluc commented on May 29, 2024

Hi all,

I just skimmed over the code and found that it's quite easy to turn into an ES module and publish to NPM. It doesn't require modernizing any of the internals, just changing some top-level code. However, it would add an extra "transpile" step that automatically creates the conventional jspsych-psychophysics.js file from the ES version of it so you don't have to maintain both. @kurokida You might continue committing a generated jspsych-psychophysics.js to Git or just let people download the package from NPM / unpkg.com instead of GitHub. And you would need to update the package version and run npm publish for every new release. Happy to send a PR and explain the setup if you're interested. Cheers!

from jspsych-psychophysics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.