Skip to content

Commit

Permalink
upate to use jspsych config for building citation
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriechang committed Aug 28, 2024
1 parent 393f155 commit 856ca69
Show file tree
Hide file tree
Showing 19 changed files with 16,395 additions and 2,716 deletions.
4,194 changes: 1,620 additions & 2,574 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"dependencies": {
"gulp": "^5.0.0",
"gulp-replace": "^1.1.4"
"gulp-replace": "^1.1.4",
"npm-link": "^0.0.4"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.0",
Expand Down
41 changes: 41 additions & 0 deletions packages/extension-test/CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "me" # Replace with last name
given-names: "me" # Replace with first name
name-particle: "me" # Replace with name particle(s)
orcid: "https://orcid.org/0000-0000-0000-0000" # Replace with ORCID
# More authors can be listed here in the same format as above
contact: # Contact person for this extension
- family-names: "me"
given-names: "me"
email: "{email}" # Replace with contact person's email
orcid: "https://orcid.org/0000-0000-0000-0000" # Replace with contact person's ORCID
title: "jsPsychExtensionTest"
version: 0.0.0
doi: 10.5281/zenodo.1234 # Replace with DOI
date-released: 2000-01-01
url: "{softwareUrl}" # Replace with URL to this extension

# If you wish to cite a paper on this extension instead, you can use the following template:
preferred-citation:
authors:
- family-names: "me"
given-names: "me"
name-particle: "me"
orcid: "https://orcid.org/0000-0000-0000-0000"
# More authors can be listed here in the same format as above
date-published: 2023-05-11
doi: 10.21105/joss.12345
issn: 1234-5678
issue: 01
journal: Journal for Open Source Software
publisher:
name: Open Journals
start: 0001
title: "{title}"
type: article # Other options include: book, pamphlet, conference-paper...
url: "{linkToPublicationInJournal}"
volume: 1

# More information on the preffered-citation CFF format can be found at https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files#citing-something-other-than-software
35 changes: 35 additions & 0 deletions packages/extension-test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# test

## Overview

test

## Loading

### In browser

```js
<script src="https://unpkg.com/@jspsych-contrib/[email protected]"></script>
```

### Via NPM

```
npm install @jspsych-contrib/extension-test
```

```js
import jsPsychExtensionTest from '@jspsych-contrib/extension-test';
```

## Compatibility

jsPsych 7.0.0

## Documentation

See [documentation](https://github.com/jspsych/jspsych-contrib/blob/main/packages/extension-test/docs/jspsych-test.md)

## Author / Citation

{authorInfo}
51 changes: 51 additions & 0 deletions packages/extension-test/docs/docs-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# test

test

## Parameters

### Initialization Parameters

Initialization parameters can be set when calling `initJsPsych()`

```js
initJsPsych({
extensions: [
{type: jsPsychExtensionTest, params: {...}}
]
})
```

Parameter | Type | Default Value | Description
----------|------|---------------|------------
| | |

### Trial Parameters

Trial parameters can be set when adding the extension to a trial object.

```js
var trial = {
type: jsPsych...,
extensions: [
{type: jsPsychExtensionTest, params: {...}}
]
}
```

Parameter | Type | Default Value | Description
----------|------|---------------|------------
| | |

## Data Generated

Name | Type | Value
-----|------|------
| |

## Functions

If the extension adds any static functions, list them here.

### function()

27 changes: 27 additions & 0 deletions packages/extension-test/examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>test Extension Example</title>
<script src="https://unpkg.com/[email protected]"></script>
<!-- Example plugin an extension may work with -->
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
<script src="../dist/index.browser.min.js"></script>
<link href="https://unpkg.com/[email protected]/css/jspsych.css" rel="stylesheet" />
</head>
<body>
<script>
const jsPsych = initJsPsych({
extensions: [{ type: jsPsychExtensionTest }],
});

const trial = {
type: jsPsychHtmlKeyboardResponse,
stimulus: "Hello world",
extensions: [{ type: jsPsychExtensionTest },
],
};

jsPsych.run([trial]);
</script>
</body>
</html>
1 change: 1 addition & 0 deletions packages/extension-test/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@jspsych/config/jest").makePackageConfig(__dirname);
Loading

0 comments on commit 856ca69

Please sign in to comment.