Skip to content
Bundles jsPsych and a list of plugins into a single file
JavaScript
Branch: master
Clone or download
Latest commit cbab00f May 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes Initial commit May 15, 2019
.gitignore Removed debugging code May 15, 2019
README.md Updated with direct links to bundle files May 15, 2019
plugins.json Initial Commit May 15, 2019
webpack.config.js Bug fix May 15, 2019

README.md

jsPsych_bundler

By virtue of its plugin architecture, jsPsych is very extensible. However, since each plugin is contained in a separate JavaScript file, downloading a lot of plugins from a web-server can cause high server load and make your experiment load relatively slowly. The jsPsych_bunder bundles jsPsych and a list of plugins into a single file, so that only one JavaScript file needs to be included.

Installing the bundler

Clone jsPsych

Clone the jsPsych repository to your hard drive, for example via the GitHub GUI.

Install Node and NPM

Node and NPM can be downloaded via this link.

Download required files from this repo

From this repo, download plugins.json and webpack.config.js. Put these files in the directory where you cloned jsPsych.

Go to the jsPsych directory

Open a command prompt and go to the directory on your hard drive where you cloned the jsPsych repository.

Install webpack and webpack-cli

In the command prompt, run the following two statements:

npm install webpack
npm install webpack-cli

Now you're set to go!

Configuring the bundler

The file plugins.json contains a JSON array with plugins you'd like to bundle with jsPsych. Put the plugins your experiment requires in this file.

Running the bundler

Run the statement below to make a file jspsych.bundle.js. This file will contain jsPsych and the plugins you've listed in plugins.json.

webpack
You can’t perform that action at this time.