pushkin-consortium / pushkin-cli

A CLI designed to facilitate the setup process of a Pushkin stack
MIT License
0 stars 4 forks source link

Auto add plugins #121

Closed jessestorbeck closed 10 months ago

jessestorbeck commented 11 months ago

This PR includes two new features:

  1. During prep, any plugins which are imported in experiment.js but haven't been added as dependencies get yarn add-ed.
  2. During install experiment, users have the option of importing a jsPsych experiment.html if they choose the basic template. This will automatically identify the plugins they need and make a new experiment.js with their timeline and the required import statements. These plugins get added as dependencies later by the feature above.

I'm making this a draft, since (1) I'd like some help testing it and (2) we can wait to merge these changes until we finish with the other changes to prep re: jsPsych timeline assets.

jessestorbeck commented 10 months ago

This now includes an additional feature. During prep, static assets used inside the jsPsych timeline in experiment.js are copied from the experiment's web page/src/assets/timeline folder to the site's pushkin/front-end/public/experiments/[experiment_name] folder.

pushkin/front-end/public can be referenced at runtime using the environment variable process.env.PUBLIC_URL.