bjoluc / jspsych-builder

A CLI utility to easily develop and package jsPsych experiments
MIT License
46 stars 12 forks source link

npm run jatos does not create a Jzip #33

Closed tmnvanderberg closed 2 years ago

tmnvanderberg commented 2 years ago

Hi, thanks for your work on this.

According to the docs,

If you want to serve your experiment using JATOS, run npm run jatos instead to create a JATOS study file (.jzip) that can be imported via the JATOS web interface.

But when I run npm run jatos:

> pris-stimuli-experiment@0.0.1 jatos
> npm run jspsych build --jatos

> pris-stimuli-experiment@0.0.1 jspsych
> jspsych -e experiment "build"

[10:39:45] Building  [started]
[10:39:45] Building experiment [title changed]
[10:39:45] Reading experiment file [started]
[10:39:45] Reading ./src/experiment.js [title changed]
[10:39:45] Reading ./src/experiment.js [completed]
[10:39:45] Cleaning build directory [started]
[10:39:45] Cleaning build directory [completed]
[10:39:45] Copying assets [started]
[10:39:46] Copying assets [completed]
[10:39:46] Building scripts and styles [started]
[10:39:51] Building scripts and styles [completed]
[10:39:51] Building experiment [completed]
[10:39:51] Packaging experiment [started]
[10:39:51] Packaging experiment [completed]
Your build has been exported to packaged/experiment_0.1.0.zip

As you can see, no jzip is generated, just a regular zip file.

I can't import this file in Jatos and when I unzip it study_assets_root the enviroment is not set correctly when running the experiment.

Kind regards.

tmnvanderberg commented 2 years ago

I should probably note that I changed the command to "jatos": "npm run jspsych build --jatos" or it would not run at all.

tmnvanderberg commented 2 years ago

Just found https://github.com/bjoluc/jspsych-builder/commit/1a0db16857ce8b076d7dd186334799d267d21d9e, feel free to close :)