mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
update plugins index.ts
This commit is contained in:
parent
f0bc8ae3ac
commit
575346846c
12
package-lock.json
generated
12
package-lock.json
generated
@ -11,7 +11,7 @@
|
||||
"@changesets/changelog-github": "^0.4.7",
|
||||
"@changesets/cli": "^2.25.2",
|
||||
"@jspsych/config": "^3.0.0",
|
||||
"husky": "^8.0.2",
|
||||
"husky": "^8.0.3",
|
||||
"import-sort-style-module": "^6.0.0",
|
||||
"lint-staged": "^13.0.3",
|
||||
"prettier": "^2.7.1",
|
||||
@ -4567,6 +4567,15 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/app-root-path": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz",
|
||||
"integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/aproba": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
|
||||
@ -16066,6 +16075,7 @@
|
||||
"@types/gulp": "4.0.17",
|
||||
"@types/jest": "29.5.8",
|
||||
"alias-hq": "6.2.4",
|
||||
"app-root-path": "^3.1.0",
|
||||
"canvas": "^2.11.2",
|
||||
"esbuild": "0.23.1",
|
||||
"gulp": "5.0.0",
|
||||
|
@ -28,7 +28,7 @@
|
||||
"@changesets/changelog-github": "^0.4.7",
|
||||
"@changesets/cli": "^2.25.2",
|
||||
"@jspsych/config": "^3.0.0",
|
||||
"husky": "^8.0.2",
|
||||
"husky": "^8.0.3",
|
||||
"import-sort-style-module": "^6.0.0",
|
||||
"lint-staged": "^13.0.3",
|
||||
"prettier": "^2.7.1",
|
||||
|
@ -3,8 +3,10 @@ import "@citation-js/plugin-software-formats";
|
||||
import "@citation-js/plugin-csl";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
import { Cite } from "@citation-js/core";
|
||||
import appRootPath from "app-root-path";
|
||||
import yaml from "yaml";
|
||||
|
||||
/**
|
||||
@ -18,19 +20,25 @@ export default function generateCitations() {
|
||||
|
||||
// Try to find CITATION.cff file and look for preferred-citation
|
||||
const citationCff = (() => {
|
||||
let rawCff;
|
||||
try {
|
||||
const rawCff = fs.readFileSync("./CITATION.cff", "utf-8").toString();
|
||||
rawCff = fs.readFileSync("./CITATION.cff", "utf-8").toString();
|
||||
const cffData = yaml.parse(rawCff);
|
||||
if (cffData["preferred-citation"]) {
|
||||
preferredCitation = true;
|
||||
}
|
||||
return yaml.stringify(rawCff);
|
||||
} catch (error) {
|
||||
console.log(
|
||||
try {
|
||||
rawCff = fs.readFileSync(path.join(appRootPath.path, "CITATION.cff"), "utf-8").toString();
|
||||
return yaml.stringify(rawCff);
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
`No CITATION.cff file found: ${error.message}. If you would like to include a citation, please create a CITATION.cff file in the root of your repository.`
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
if (!citationCff) {
|
||||
|
@ -46,6 +46,7 @@
|
||||
"@types/gulp": "4.0.17",
|
||||
"@types/jest": "29.5.8",
|
||||
"alias-hq": "6.2.4",
|
||||
"app-root-path": "^3.1.0",
|
||||
"canvas": "^2.11.2",
|
||||
"esbuild": "0.23.1",
|
||||
"gulp": "5.0.0",
|
||||
|
@ -16,6 +16,7 @@ class RecordVideoExtension implements JsPsychExtension {
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
constructor(private jsPsych: JsPsych) {
|
||||
|
@ -91,6 +91,7 @@ class WebGazerExtension implements JsPsychExtension {
|
||||
},
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
constructor(private jsPsych: JsPsych) {}
|
||||
|
@ -96,6 +96,7 @@ const info = <const>{
|
||||
},
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -110,6 +110,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -82,6 +82,7 @@ const info = <const>{
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -117,6 +117,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -173,6 +173,7 @@ const info = <const>{
|
||||
type: ParameterType.BOOL,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -27,6 +27,7 @@ const info = <const>{
|
||||
default: undefined,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -113,6 +113,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -78,6 +78,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -90,6 +90,7 @@ const info = <const>{
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -90,6 +90,7 @@ const info = <const>{
|
||||
type: ParameterType.BOOL,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -95,6 +95,7 @@ const info = <const>{
|
||||
type: ParameterType.BOOL,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -96,6 +96,7 @@ const info = <const>{
|
||||
type: ParameterType.BOOL,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -39,6 +39,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -48,6 +48,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -167,6 +167,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -46,6 +46,7 @@ const info = <const>{
|
||||
description: "Time in milliseconds until the user entered fullscreen mode.",
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -75,6 +75,7 @@ const info = <const>{
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -85,6 +85,7 @@ const info = <const>{
|
||||
type: ParameterType.HTML_STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -92,6 +92,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -80,6 +80,7 @@ const info = <const>{
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -111,6 +111,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -111,6 +111,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -124,6 +124,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -88,6 +88,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -128,6 +128,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -48,6 +48,7 @@ const info = <const>{
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -23,6 +23,7 @@ const info = <const>{
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -92,6 +92,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -75,6 +75,7 @@ const info = <const>{
|
||||
},
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -38,6 +38,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -52,6 +52,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -50,6 +50,7 @@ const info = <const>{
|
||||
type: ParameterType.FLOAT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -76,6 +76,7 @@ const info = <const>{
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -78,6 +78,7 @@ const info = <const>{
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -88,6 +88,7 @@ const info = <const>{
|
||||
type: ParameterType.BOOL,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -98,6 +98,7 @@ const info = <const>{
|
||||
type: ParameterType.BOOL,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -255,6 +255,7 @@ const info = <const>{
|
||||
},
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -60,6 +60,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -88,6 +88,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -105,6 +105,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -110,6 +110,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -108,6 +108,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -66,6 +66,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -162,6 +162,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -109,6 +109,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -164,6 +164,7 @@ const info = <const>{
|
||||
type: ParameterType.FLOAT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -170,6 +170,7 @@ const info = <const>{
|
||||
type: ParameterType.FLOAT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -133,6 +133,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -62,6 +62,7 @@ const info = <const>{
|
||||
data: {
|
||||
// no data collected
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -30,6 +30,7 @@ const info = <const>{
|
||||
type: ParameterType.INT,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
@ -103,6 +103,7 @@ const info = <const>{
|
||||
array: true,
|
||||
},
|
||||
},
|
||||
citations: "__CITATIONS__",
|
||||
};
|
||||
|
||||
type Info = typeof info;
|
||||
|
Loading…
Reference in New Issue
Block a user