Skip to content

Commit

Permalink
Deployed b866677 to v8 with MkDocs 1.6.0 and mike 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
docs-bot committed Dec 24, 2024
1 parent 7efbb44 commit 208db50
Show file tree
Hide file tree
Showing 11 changed files with 451 additions and 299 deletions.
42 changes: 42 additions & 0 deletions v8/about/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2635,6 +2635,21 @@
</span>
</a>

<nav class="md-nav" aria-label="Citation">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#citation-tool-for-third-party-pluginsextensions" class="md-nav__link">
<span class="md-ellipsis">
Citation tool for third-party plugins/extensions
</span>
</a>

</li>

</ul>
</nav>

</li>

</ul>
Expand Down Expand Up @@ -2770,6 +2785,21 @@
</span>
</a>

<nav class="md-nav" aria-label="Citation">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#citation-tool-for-third-party-pluginsextensions" class="md-nav__link">
<span class="md-ellipsis">
Citation tool for third-party plugins/extensions
</span>
</a>

</li>

</ul>
</nav>

</li>

</ul>
Expand All @@ -2795,10 +2825,22 @@ <h1 id="about-jspsych">About jsPsych<a class="headerlink" href="#about-jspsych"
<p>jsPsych was created by <a href="https://www.vassar.edu/faculty/jdeleeuw">Josh de Leeuw</a>.</p>
<h3 id="citation">Citation<a class="headerlink" href="#citation" title="Permanent link">&para;</a></h3>
<p>If you use this library in academic work, the preferred citation is:</p>
<blockquote>
<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>
</blockquote>
<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>
<blockquote>
<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>
</blockquote>
<p>Citations help us demonstrate that this library is used and valued, which allows us to continue working on it.</p>
<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>
<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>
<ol>
<li>Launch a jsPsych experiment in your browser</li>
<li>Open up the browser console using Ctrl + ⇧ + J (Windows) or ⌘ + ⌥ + J (Mac)</li>
<li>Type <code>jsPsych.getCitations()</code></li>
</ol>
<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>



Expand Down
2 changes: 1 addition & 1 deletion v8/demos/jspsych-survey-multi-choice-demo1.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script src="docs-demo-timeline.js"></script>
<script src="https://unpkg.com/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/[email protected].1"></script>
<script src="https://unpkg.com/@jspsych/[email protected].2"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/jspsych.css" />
<link rel="stylesheet" href="docs-demo.css" type="text/css">
</head>
Expand Down
2 changes: 1 addition & 1 deletion v8/demos/jspsych-survey-multi-choice-demo2.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script src="docs-demo-timeline.js"></script>
<script src="https://unpkg.com/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/[email protected].1"></script>
<script src="https://unpkg.com/@jspsych/[email protected].2"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/jspsych.css" />
<link rel="stylesheet" href="docs-demo.css" type="text/css">
</head>
Expand Down
6 changes: 5 additions & 1 deletion v8/developers/contributing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2878,6 +2878,9 @@ <h3 id="contributing-to-the-codebase">Contributing to the codebase<a class="head
<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>
</li>
<li>
<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>
</li>
<li>
<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>
</li>
<li>
Expand All @@ -2890,7 +2893,8 @@ <h3 id="contributing-to-the-documentation">Contributing to the documentation<a c
<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>
<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>
<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>
<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>
<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>
<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>



Expand Down
57 changes: 13 additions & 44 deletions v8/developers/plugin-development/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2446,21 +2446,15 @@
</span>
</a>

<nav class="md-nav" aria-label="Requirements for a plugin">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#templates" class="md-nav__link">
</li>

<li class="md-nav__item">
<a href="#plugin-templates" class="md-nav__link">
<span class="md-ellipsis">
Templates
Plugin templates
</span>
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
Expand Down Expand Up @@ -2590,15 +2584,6 @@
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#plugin-templates" class="md-nav__link">
<span class="md-ellipsis">
Plugin templates
</span>
</a>

</li>

</ul>
Expand Down Expand Up @@ -2923,21 +2908,15 @@
</span>
</a>

<nav class="md-nav" aria-label="Requirements for a plugin">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#templates" class="md-nav__link">
</li>

<li class="md-nav__item">
<a href="#plugin-templates" class="md-nav__link">
<span class="md-ellipsis">
Templates
Plugin templates
</span>
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
Expand Down Expand Up @@ -3067,15 +3046,6 @@
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#plugin-templates" class="md-nav__link">
<span class="md-ellipsis">
Plugin templates
</span>
</a>

</li>

</ul>
Expand Down Expand Up @@ -3104,8 +3074,9 @@ <h2 id="requirements-for-a-plugin">Requirements for a plugin<a class="headerlink
<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>
<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>
</ul>
<h3 id="templates">Templates<a class="headerlink" href="#templates" title="Permanent link">&para;</a></h3>
<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>
<h2 id="plugin-templates">Plugin templates<a class="headerlink" href="#plugin-templates" title="Permanent link">&para;</a></h2>
<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>
<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>
<h2 id="plugin-components">Plugin components<a class="headerlink" href="#plugin-components" title="Permanent link">&para;</a></h2>
<h3 id="constructor">constructor()<a class="headerlink" href="#constructor" title="Permanent link">&para;</a></h3>
<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>
Expand Down Expand Up @@ -3351,8 +3322,6 @@ <h2 id="simulation-mode">Simulation mode<a class="headerlink" href="#simulation-
<h2 id="advice-for-writing-plugins">Advice for writing plugins<a class="headerlink" href="#advice-for-writing-plugins" title="Permanent link">&para;</a></h2>
<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>
<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>
<h2 id="plugin-templates">Plugin templates<a class="headerlink" href="#plugin-templates" title="Permanent link">&para;</a></h2>
<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>



Expand Down
2 changes: 1 addition & 1 deletion v8/plugins/survey-multi-choice/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2921,7 +2921,7 @@ <h2 id="data-generated">Data Generated<a class="headerlink" href="#data-generate
</table>
<h2 id="install">Install<a class="headerlink" href="#install" title="Permanent link">&para;</a></h2>
<p>Using the CDN-hosted JavaScript file:</p>
<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>
<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>
</code></pre></div>
<p>Using the JavaScript file downloaded from a GitHub release dist archive:</p>
<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>
Expand Down
Loading

0 comments on commit 208db50

Please sign in to comment.