Commit Graph

13 Commits

Author SHA1 Message Date
bjoluc
6006fec96a Prepare @jspsych/config for external use 2021-08-25 21:57:28 +02:00
Josh de Leeuw
b3b9f5fd5e
Create modular versions of extensions (#2053)
Extensions are now passed to the `JsPsych` constructor via an `extensions` option.
Along the way, the webgazer plugins and plugin-html-button-response have been modularized as well.

Co-authored-by: bjoluc <mail@bjoluc.de>
Co-authored-by: Becky Gilbert <beckyannegilbert@gmail.com>
2021-08-20 11:15:33 +02:00
bjoluc
105b041255 Configure husky to run prettier via lint-staged 2021-08-13 22:04:28 +02:00
bjoluc
559f60c83e Add Gulp script to create a dist archive 2021-08-09 09:35:48 +02:00
bjoluc
8cfbba526a Use classes to avoid global state
Instead of a global `jsPsych` object, there is a `JsPsych` class now
which can be instantiated with the parameters that were previously
accepted by `jsPsych.init`. Upon instantiation, the `JsPsych` class also
instantiates classes for stateful modules (`jsPsych.data` and
`jsPsych.pluginAPI`) and passes relevant `JsPsych` instance information
to them. Plugins are expected to be classes now that are instantiated
for each trial and receive the `JsPsych` instance as their only
constructor argument.
2021-07-12 18:15:37 +02:00
bjoluc
91e7b1e3ff Migrate to TypeScript 2021-07-06 17:55:42 +02:00
bjoluc
d12052c774 Decompose jspsych core into ES6 modules 2021-07-01 12:46:41 +02:00
bjoluc
744e67b0a5 Setup monorepo and switch to ES6 modules
* Convert jsPsych and plugins to ES6 modules
* Create packages for each plugin, the core library, and config files
* Setup rollup, jest, and babel configurations
* Update jsPsych to load plugin objects directly from the `type` field
* Update tests to use the ES6 modules
2021-06-23 22:39:38 +02:00
Josh de Leeuw
54dad43b7f update jest to 26.6 2020-10-20 14:37:37 -04:00
Josh de Leeuw
40f433651b bump jest v22 -> v24 2019-07-05 11:49:30 -04:00
Josh de Leeuw
501a5be52a update all to performance.now() - #492 2018-10-09 16:13:59 -04:00
Josh de Leeuw
e89c947de7 jest upgrade, fixing tests to work with upgrade of jsdom 2017-12-28 16:07:15 -05:00
KristinDiep
9e715e2457 iat-image, iat-html, image-keyboard-response tests done 2017-07-07 14:46:33 -04:00