Commit Graph

4 Commits

Author SHA1 Message Date
bjoluc
6006fec96a Prepare @jspsych/config for external use 2021-08-25 21:57:28 +02:00
bjoluc
82fa8e3f29 Add explicit include option to TS configs
So VS Code ignores the `dist` folders
2021-07-13 09:54:29 +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