This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 Convert require() to es import
This converts several require() expressions to es import statements, to accommodate importing jspsych 7 plugins that are es modules. BREAKING CHANGE: 🧨 jspsych 7 es modules are not compatible with require() expressions.
- Loading branch information
1 parent
d222b99
commit 265e050
Showing
22 changed files
with
14,862 additions
and
10,967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
const _ = require('lodash') | ||
import { extend } from 'lodash' | ||
import { countdown } from './trials/countdown' | ||
import { showMessage } from './trials/showMessage' | ||
import { fixation } from './trials/fixation' | ||
import { userId } from './trials/userId' | ||
import { showImage } from './trials/showImage' | ||
import { slider } from './trials/slider' | ||
import { survey } from './trials/survey' | ||
import { multiSurvey } from './trials/multiSurvey' | ||
|
||
const defaultconfig = { USE_PHOTODIODE: false, USE_EEG: false, USE_ELECTRON: true, USE_MTURK: false} | ||
const defaultconfig = { USE_PHOTODIODE: false, USE_EEG: false, USE_ELECTRON: true, USE_MTURK: false } | ||
|
||
function init(_config) { | ||
return extend(defaultconfig, _config) | ||
} | ||
|
||
module.exports = { | ||
init: function(_config){ | ||
return _.extend(defaultconfig,_config) | ||
}, | ||
countdown: require('./trials/countdown.js'), | ||
showMessage: require('./trials/showMessage.js'), | ||
fixation: require('./trials/fixation.js'), | ||
userId: require('./trials/userId.js'), | ||
showImage: require('./trials/showImage.js'), | ||
slider: require('./trials/slider.js'), | ||
survey: require('./trials/survey.js'), | ||
multiSurvey: require('./trials/multiSurvey.js') | ||
}; | ||
export { | ||
init, | ||
countdown, | ||
showMessage, | ||
fixation, | ||
userId, | ||
showImage, | ||
slider, | ||
survey, | ||
multiSurvey | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {presets: ['@babel/preset-env']} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.