Skip to content

Commit 208db50

Browse files
author
docs-bot
committed
Deployed b866677 to v8 with MkDocs 1.6.0 and mike 2.1.1
1 parent 7efbb44 commit 208db50

File tree

11 files changed

+451
-299
lines changed

11 files changed

+451
-299
lines changed

v8/about/about/index.html

+42
Original file line numberDiff line numberDiff line change
@@ -2635,6 +2635,21 @@
26352635
</span>
26362636
</a>
26372637

2638+
<nav class="md-nav" aria-label="Citation">
2639+
<ul class="md-nav__list">
2640+
2641+
<li class="md-nav__item">
2642+
<a href="#citation-tool-for-third-party-pluginsextensions" class="md-nav__link">
2643+
<span class="md-ellipsis">
2644+
Citation tool for third-party plugins/extensions
2645+
</span>
2646+
</a>
2647+
2648+
</li>
2649+
2650+
</ul>
2651+
</nav>
2652+
26382653
</li>
26392654

26402655
</ul>
@@ -2770,6 +2785,21 @@
27702785
</span>
27712786
</a>
27722787

2788+
<nav class="md-nav" aria-label="Citation">
2789+
<ul class="md-nav__list">
2790+
2791+
<li class="md-nav__item">
2792+
<a href="#citation-tool-for-third-party-pluginsextensions" class="md-nav__link">
2793+
<span class="md-ellipsis">
2794+
Citation tool for third-party plugins/extensions
2795+
</span>
2796+
</a>
2797+
2798+
</li>
2799+
2800+
</ul>
2801+
</nav>
2802+
27732803
</li>
27742804

27752805
</ul>
@@ -2795,10 +2825,22 @@ <h1 id="about-jspsych">About jsPsych<a class="headerlink" href="#about-jspsych"
27952825
<p>jsPsych was created by <a href="https://www.vassar.edu/faculty/jdeleeuw">Josh de Leeuw</a>.</p>
27962826
<h3 id="citation">Citation<a class="headerlink" href="#citation" title="Permanent link">&para;</a></h3>
27972827
<p>If you use this library in academic work, the preferred citation is:</p>
2828+
<blockquote>
27982829
<p>de Leeuw, J.R., Gilbert, R.A., &amp; Luchterhandt, B. (2023). jsPsych: Enabling an open-source collaborative ecosystem of behavioral experiments. <em>Journal of Open Source Software</em>, <em>8</em>(85), 5351, <a href="https://joss.theoj.org/papers/10.21105/joss.05351">https://joss.theoj.org/papers/10.21105/joss.05351</a>.</p>
2830+
</blockquote>
27992831
<p>This paper is an updated description of jsPsych and includes all current core team members. It replaces the earlier paper that described jsPsych:</p>
2832+
<blockquote>
28002833
<p>de Leeuw, J.R. (2015). jsPsych: A JavaScript library for creating behavioral experiments in a Web browser. <em>Behavior Research Methods</em>, <em>47</em>(1), 1-12. doi:<a href="http://link.springer.com/article/10.3758%2Fs13428-014-0458-y">10.3758/s13428-014-0458-y</a></p>
2834+
</blockquote>
28012835
<p>Citations help us demonstrate that this library is used and valued, which allows us to continue working on it.</p>
2836+
<h4 id="citation-tool-for-third-party-pluginsextensions">Citation tool for third-party plugins/extensions<a class="headerlink" href="#citation-tool-for-third-party-pluginsextensions" title="Permanent link">&para;</a></h4>
2837+
<p>jsPsych is an open-source, collaborative ecosystem, and many of the plugins/extensions you end up using may be contributed by third-party developers! We want to make sure they get recognition for their good work, so we made a command-line citation tool that you should use to cite this library and the plugins/extensions used in your experiment. You can see this tool in action by following these steps:</p>
2838+
<ol>
2839+
<li>Launch a jsPsych experiment in your browser</li>
2840+
<li>Open up the browser console using Ctrl + ⇧ + J (Windows) or ⌘ + ⌥ + J (Mac)</li>
2841+
<li>Type <code>jsPsych.getCitations()</code></li>
2842+
</ol>
2843+
<p>This should print the APA format citation for the jsPsych library, which you can then copy and paste into your working document. To cite the plugins/extensions in your experiment, you should pass in an array containing the name of each plugin/extension to generate a list of citations, e.g. <code>jsPsych.getCitations([jsPsychHtmlKeyboardResponse, jsPsychMouseTrackingExtension])</code>. You can also pass in the desired output citation format as the second argument, e.g. <code>jsPsych.getCitations([jsPsychHtmlKeyboardResponse, jsPsychMouseTrackingExtension], "apa")</code>. We currently support APA formatting (<code>"apa"</code>) and BibTex formatting (<code>"bibtex"</code>).</p>
28022844

28032845

28042846

v8/demos/jspsych-survey-multi-choice-demo1.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script src="docs-demo-timeline.js"></script>
55
<script src="https://unpkg.com/[email protected]"></script>
66
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
7-
<script src="https://unpkg.com/@jspsych/[email protected].1"></script>
7+
<script src="https://unpkg.com/@jspsych/[email protected].2"></script>
88
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/jspsych.css" />
99
<link rel="stylesheet" href="docs-demo.css" type="text/css">
1010
</head>

v8/demos/jspsych-survey-multi-choice-demo2.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script src="docs-demo-timeline.js"></script>
55
<script src="https://unpkg.com/[email protected]"></script>
66
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
7-
<script src="https://unpkg.com/@jspsych/[email protected].1"></script>
7+
<script src="https://unpkg.com/@jspsych/[email protected].2"></script>
88
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/jspsych.css" />
99
<link rel="stylesheet" href="docs-demo.css" type="text/css">
1010
</head>

v8/developers/contributing/index.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -2878,6 +2878,9 @@ <h3 id="contributing-to-the-codebase">Contributing to the codebase<a class="head
28782878
<p><strong>An example file should be included if applicable.</strong> If you are contributing a new feature, new plugin, or new extension, or contributing a modification that changes the behavior of the library in some important way, consider adding an example file to the <code>/examples</code> folder in the repository.</p>
28792879
</li>
28802880
<li>
2881+
<p><strong>If you are contributing a plugin/extension, we strongly encourage including a file containing citation information.</strong> This file should be named <code>CITATION.cff</code> and placed at the root of your repository. This allows people who use your plugin/extension in their code to easily cite your work by calling <code>jsPsych.getCitations([&lt;yourPlugin&gt;])</code> from their command line. More information on <code>.cff</code> files can be found <a href="https://citation-file-format.github.io/">here</a>.</p>
2882+
</li>
2883+
<li>
28812884
<p><strong>A changeset must be included in the pull request</strong>. We use <a href="https://github.com/atlassian/changesets/blob/main/docs/adding-a-changeset.md">changesets</a> to generate new releases and their corresponding release notes. <a href="https://github.com/atlassian/changesets/blob/main/docs/adding-a-changeset.md">This is a good overview of changesets</a> that explains how to add one to your pull request. Feel free to ask for help with this!</p>
28822885
</li>
28832886
<li>
@@ -2890,7 +2893,8 @@ <h3 id="contributing-to-the-documentation">Contributing to the documentation<a c
28902893
<h2 id="contributing-to-jspsych-vs-jspsych-contrib">Contributing to <code>jspsych</code> vs. <code>jspsych-contrib</code><a class="headerlink" href="#contributing-to-jspsych-vs-jspsych-contrib" title="Permanent link">&para;</a></h2>
28912894
<p>If you are developing a new plugin or extension there are two different repositories that you can contribute to: <a href="https://github.com/jspsych/jsPsych"><code>jspsych</code></a> or <a href="https://github.com/jspsych/jspsych-contrib"><code>jspsych-contrib</code></a>. </p>
28922895
<p>The main <code>jspsych</code> repository is open to new plugins and extensions that are likely to be widely used. We require that contributions to main repository are well documented and tested before they are merged. Contributions to the main repository must use TypeScript. We limit contributions to this repository because once a plugin or extension is in the main codebase we are generally committed to providing updates as we develop new versions of jsPsych. Each new plugin and extension potentially increases the amount of development work that we will need to do in the future, so we are somewhat selective about what we will merge. If you have an idea that you'd like to discuss please <a href="https://github.com/jspsych/jsPsych/discussions/new">open a discussion thread</a> and we'd love to chat about it!</p>
2893-
<p>The <code>jspsych-contrib</code> repository is open to any contributions that are complete and working code. There are some minimal guidelines in place about basic documentation that should be provided. Contributors can choose whether to develop their plugin or extension using our <a href="https://github.com/jspsych/jspsych-contrib/tree/main/packages/plugin-template-ts">TypeScript template</a> or using our <a href="https://github.com/jspsych/jspsych-contrib/tree/main/packages/plugin-template">JavaScript template</a>. Contributions to <code>jspsych-contrib</code> are not evaluated for general usefulness in the same way that contributions to the main repository are. We also periodically consider whether to move contributions into the main repository from <code>jspsych-contrib</code> based on their popularity and completeness (documentation and testing).</p>
2896+
<p>The <code>jspsych-contrib</code> repository is open to any contributions that are complete and working code. There are some minimal guidelines in place about basic documentation that should be provided. Contributors can choose whether to develop their plugin or extension using our <a href="https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-ts/src/index.ts">TypeScript template</a> or using our <a href="https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-js/src/index.js">JavaScript template</a>. Check our <a href="https://www.jspsych.org/latest/developers/plugin-development/">plugin developer documentation</a> for additional guidance. </p>
2897+
<p>Contributions to <code>jspsych-contrib</code> are not evaluated for general usefulness in the same way that contributions to the main repository are. We also periodically consider whether to move contributions into the main repository from <code>jspsych-contrib</code> based on their popularity and completeness (documentation and testing).</p>
28942898

28952899

28962900

v8/developers/plugin-development/index.html

+13-44
Original file line numberDiff line numberDiff line change
@@ -2446,21 +2446,15 @@
24462446
</span>
24472447
</a>
24482448

2449-
<nav class="md-nav" aria-label="Requirements for a plugin">
2450-
<ul class="md-nav__list">
2451-
2452-
<li class="md-nav__item">
2453-
<a href="#templates" class="md-nav__link">
2449+
</li>
2450+
2451+
<li class="md-nav__item">
2452+
<a href="#plugin-templates" class="md-nav__link">
24542453
<span class="md-ellipsis">
2455-
Templates
2454+
Plugin templates
24562455
</span>
24572456
</a>
24582457

2459-
</li>
2460-
2461-
</ul>
2462-
</nav>
2463-
24642458
</li>
24652459

24662460
<li class="md-nav__item">
@@ -2590,15 +2584,6 @@
25902584
</span>
25912585
</a>
25922586

2593-
</li>
2594-
2595-
<li class="md-nav__item">
2596-
<a href="#plugin-templates" class="md-nav__link">
2597-
<span class="md-ellipsis">
2598-
Plugin templates
2599-
</span>
2600-
</a>
2601-
26022587
</li>
26032588

26042589
</ul>
@@ -2923,21 +2908,15 @@
29232908
</span>
29242909
</a>
29252910

2926-
<nav class="md-nav" aria-label="Requirements for a plugin">
2927-
<ul class="md-nav__list">
2928-
2929-
<li class="md-nav__item">
2930-
<a href="#templates" class="md-nav__link">
2911+
</li>
2912+
2913+
<li class="md-nav__item">
2914+
<a href="#plugin-templates" class="md-nav__link">
29312915
<span class="md-ellipsis">
2932-
Templates
2916+
Plugin templates
29332917
</span>
29342918
</a>
29352919

2936-
</li>
2937-
2938-
</ul>
2939-
</nav>
2940-
29412920
</li>
29422921

29432922
<li class="md-nav__item">
@@ -3067,15 +3046,6 @@
30673046
</span>
30683047
</a>
30693048

3070-
</li>
3071-
3072-
<li class="md-nav__item">
3073-
<a href="#plugin-templates" class="md-nav__link">
3074-
<span class="md-ellipsis">
3075-
Plugin templates
3076-
</span>
3077-
</a>
3078-
30793049
</li>
30803050

30813051
</ul>
@@ -3104,8 +3074,9 @@ <h2 id="requirements-for-a-plugin">Requirements for a plugin<a class="headerlink
31043074
<li><a href="#trial">A <code>trial()</code> method</a> that accepts an <code>HTMLElement</code> as its first argument and an <code>object</code> of trial parameters as its second argument. There is an optional third argument to <a href="#asynchronous-loading">handle the <code>on_load</code> event</a> in certain cirumstances. The <code>trial()</code> method should <em>either</em> invoke <code>jsPsych.finishTrial()</code> or should be an <code>async</code> function that returns a data object to <a href="#save-data">end the trial and save data</a>.</li>
31053075
<li><a href="#static-info">A static <code>info</code> property</a> on the class that contains an object describing the plugin's parameters, data generated, and version.</li>
31063076
</ul>
3107-
<h3 id="templates">Templates<a class="headerlink" href="#templates" title="Permanent link">&para;</a></h3>
3108-
<p>Plugins can be written in either plain JavaScript or in TypeScript. Template files for both <a href="https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-js/src/index.js">JavaScript</a> and <a href="https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-ts/src/index.ts">TypeScript</a> are available in the <a href="https://github.com/jspsych/jspsych-contrib/">jspsych-contrib repository</a>.</p>
3077+
<h2 id="plugin-templates">Plugin templates<a class="headerlink" href="#plugin-templates" title="Permanent link">&para;</a></h2>
3078+
<p>Templates for plugins are available in the <a href="https://github.com/jspsych/jspsych-contrib">jspsych-contrib</a> repository. Plugins can be written in either plain <a href="https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-js/src/index.js">JavaScript</a> or in <a href="https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-ts/src/index.ts">TypeScript</a>.</p>
3079+
<p>To get started with a template, we recommend using the CLI tool that we have published in jspsych-contrib. This automates the setup of a new plugin in either JavaScript or TypeScript. Additional information about the CLI tool is available in the <a href="https://github.com/jspsych/jspsych-contrib?tab=readme-ov-file#creating-a-new-plugin-or-extension"><code>README</code></a> of jspsych-contrib. </p>
31093080
<h2 id="plugin-components">Plugin components<a class="headerlink" href="#plugin-components" title="Permanent link">&para;</a></h2>
31103081
<h3 id="constructor">constructor()<a class="headerlink" href="#constructor" title="Permanent link">&para;</a></h3>
31113082
<p>The plugin's <code>constructor()</code> will be passed a reference to the instance of the <code>JsPsych</code> class that is running the experiment. The constructor should store this reference so that the plugin can access functionality from the core library and its modules.</p>
@@ -3351,8 +3322,6 @@ <h2 id="simulation-mode">Simulation mode<a class="headerlink" href="#simulation-
33513322
<h2 id="advice-for-writing-plugins">Advice for writing plugins<a class="headerlink" href="#advice-for-writing-plugins" title="Permanent link">&para;</a></h2>
33523323
<p>If you are developing a plugin with the aim of including it in the main jsPsych repository we encourage you to follow the <a href="../contributing/#contributing-to-the-codebase">contribution guidelines</a>. </p>
33533324
<p>We also recommend that you make your plugin <em>as general as possible</em>. Consider using parameters to give the user of the plugin as many options for customization as possible. For example, if you have any text that displays in the plugin including things like button labels, implement the text as a parameter. This allows users running experiments in other languages to replace text values as needed.</p>
3354-
<h2 id="plugin-templates">Plugin templates<a class="headerlink" href="#plugin-templates" title="Permanent link">&para;</a></h2>
3355-
<p>Templates for plugins are available in the <a href="https://github.com/jspsych/jspsych-contrib">jspsych-contrib</a> repository. There is a command-line tool for generating a new plugin from these templates in that repository. See the README file in the jspsych-contrib repository for more information.</p>
33563325

33573326

33583327

v8/plugins/survey-multi-choice/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2921,7 +2921,7 @@ <h2 id="data-generated">Data Generated<a class="headerlink" href="#data-generate
29212921
</table>
29222922
<h2 id="install">Install<a class="headerlink" href="#install" title="Permanent link">&para;</a></h2>
29232923
<p>Using the CDN-hosted JavaScript file:</p>
2924-
<div class="highlight"><pre><span></span><code><span class="o">&lt;</span><span class="nx">script</span><span class="w"> </span><span class="nx">src</span><span class="o">=</span><span class="s2">&quot;https://unpkg.com/@jspsych/[email protected].1&quot;</span><span class="o">&gt;&lt;</span><span class="err">/script&gt;</span>
2924+
<div class="highlight"><pre><span></span><code><span class="o">&lt;</span><span class="nx">script</span><span class="w"> </span><span class="nx">src</span><span class="o">=</span><span class="s2">&quot;https://unpkg.com/@jspsych/[email protected].2&quot;</span><span class="o">&gt;&lt;</span><span class="err">/script&gt;</span>
29252925
</code></pre></div>
29262926
<p>Using the JavaScript file downloaded from a GitHub release dist archive:</p>
29272927
<div class="highlight"><pre><span></span><code><span class="o">&lt;</span><span class="nx">script</span><span class="w"> </span><span class="nx">src</span><span class="o">=</span><span class="s2">&quot;jspsych/plugin-survey-multi-choice.js&quot;</span><span class="o">&gt;&lt;</span><span class="err">/script&gt;</span>

0 commit comments

Comments
 (0)