Skip to content

Commit

Permalink
Pushing final changes addressing comments on the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhang03 committed Jul 22, 2024
1 parent 43d6245 commit 93b0d99
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
8 changes: 3 additions & 5 deletions templates/extension-template-js/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { version } from "./package.json";

var _globalName_ = (function (jspsych) {
"use strict";

Expand Down Expand Up @@ -28,14 +26,14 @@ var _globalName_ = (function (jspsych) {

on_finish(params) {
return {
data1: 99, // Make sure this type and name matches data1
data2: "hello world!", // Make this this type and name matches data2
data1: 99, // Make sure this type and name matches the information for data1 in the data object contained within the info const.
data2: "hello world!", // Make sure this type and name matches the information for data2 in the data object contained within the info const.
};
}
}
ExtensionNameExtension.info = {
name: "{name}",
version: version,
version: "1.0.0", // When working in a Javascript environment with no build, you will need to manually put set the version information. This is used for metadata purposes and publishing.
data: {
/** Provide a clear description of the data1 that could be used as documentation. We will eventually use these comments to automatically build documentation and produce metadata. */
data1: {
Expand Down
4 changes: 2 additions & 2 deletions templates/extension-template-ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class ExtensionNameExtension implements JsPsychExtension {

on_finish = ({}: OnFinishParameters): { [key: string]: any } => {
return {
data1: 99, // Make sure this type and name matches data1
data2: "hello world!", // Make this this type and name matches data2
data1: 99, // Make sure this type and name matches the information for data1 in the data object contained within the info const.
data2: "hello world!", // Make sure this type and name matches the information for data2 in the data object contained within the info const.
};
};
}
Expand Down
8 changes: 3 additions & 5 deletions templates/plugin-template-js/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { version } from "./package.json";

var _globalName_ = (function (jspsych) {
"use strict";

const info = {
name: "{name}",
version: version,
version: "1.0.0", // When working in a Javascript environment with no build, you will need to manually put set the version information. This is used for metadata purposes and publishing.
parameters: {
/** Provide a clear description of the parameter_name that could be used as documentation. We will eventually use these comments to automatically build documentation and produce metadata. */
parameter_name: {
Expand Down Expand Up @@ -45,8 +43,8 @@ var _globalName_ = (function (jspsych) {
trial(display_element, trial) {
// data saving
var trial_data = {
data1: 99, // Make sure this type and name matches data1
data2: "hello world!", // Make this this type and name matches data2
data1: 99, // Make sure this type and name matches the information for data1 in the data object contained within the info const.
data2: "hello world!", // Make sure this type and name matches the information for data2 in the data object contained within the info const.
};
// end trial
this.jsPsych.finishTrial(trial_data);
Expand Down
4 changes: 2 additions & 2 deletions templates/plugin-template-ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class PluginNamePlugin implements JsPsychPlugin<Info> {
trial(display_element: HTMLElement, trial: TrialType<Info>) {
// data saving
var trial_data = {
data1: 99, // Make sure this type and name matches data1
data2: "hello world!", // Make this this type and name matches data2
data1: 99, // Make sure this type and name matches the information for data1 in the data object contained within the info const.
data2: "hello world!", // Make sure this type and name matches the information for data2 in the data object contained within the info const.
};

// end trial
Expand Down

0 comments on commit 93b0d99

Please sign in to comment.