diff --git a/docs/developers/contributing.md b/docs/developers/contributing.md index ef0e34e9..dc232db0 100644 --- a/docs/developers/contributing.md +++ b/docs/developers/contributing.md @@ -39,7 +39,7 @@ If you are developing a new plugin or extension there are two different reposito The main `jspsych` 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 [open a discussion thread](https://github.com/jspsych/jsPsych/discussions/new) and we'd love to chat about it! -The `jspsych-contrib` 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 [TypeScript template](https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-ts/src/index.ts) or using our [JavaScript template](https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-js/src/index.js). Check our [plugin developer documentation](https://www.jspsych.org/latest/developers/plugin-development/) for additional guidance. +The `jspsych-contrib` 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 easily start building a new plugin or extension using our [new-plugin](https://github.com/jspsych/jspsych-dev/tree/main/packages/new-plugin) and [new-extension](https://github.com/jspsych/jspsych-dev/tree/main/packages/new-extension) tools. Both tools run from the command line and will automatically generate a template plugin/extension package, which includes boilerplate code and essential files. Both of these tools also offer TypeScript and JavaScript versions of the generated package to choose from. Check our [plugin developer documentation](https://www.jspsych.org/latest/developers/plugin-development/) for additional guidance. Contributions to `jspsych-contrib` 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 `jspsych-contrib` based on their popularity and completeness (documentation and testing). diff --git a/docs/developers/extension-development.md b/docs/developers/extension-development.md index f7c4c800..f8c44dd4 100644 --- a/docs/developers/extension-development.md +++ b/docs/developers/extension-development.md @@ -13,7 +13,7 @@ As of version 7.0, extensions are [JavaScript Classes](https://developer.mozilla ### Templates -Plugins can be written in either plain JavaScript or in TypeScript. Template files for both [JavaScript](https://github.com/jspsych/jspsych-contrib/blob/main/packages/extension-template/index.js) and [TypeScript](https://github.com/jspsych/jspsych-contrib/blob/main/packages/extension-template-ts/src/index.ts) are available in the [jspsych-contrib repository](https://github.com/jspsych/jspsych-contrib/). +Plugins can be written in either plain JavaScript or in TypeScript. Template files for both [JavaScript](https://github.com/jspsych/jspsych-dev/blob/main/packages/new-extension/templates/extension-template-js/src/index.js) and [TypeScript](https://github.com/jspsych/jspsych-dev/blob/main/packages/new-extension/templates/extension-template-ts/src/index.ts) are available in the [jspsych-dev repository](https://github.com/jspsych/jspsych-dev/). ## Extension components diff --git a/docs/developers/plugin-development.md b/docs/developers/plugin-development.md index fca0e2e0..ef749533 100644 --- a/docs/developers/plugin-development.md +++ b/docs/developers/plugin-development.md @@ -10,9 +10,9 @@ As of version 7.0, plugins are [JavaScript Classes](https://developer.mozilla.or ## Plugin templates -Templates for plugins are available in the [jspsych-contrib](https://github.com/jspsych/jspsych-contrib) repository. Plugins can be written in either plain [JavaScript](https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-js/src/index.js) or in [TypeScript](https://github.com/jspsych/jspsych-contrib/blob/main/templates/plugin-template-ts/src/index.ts). +Templates for plugins are available in the [jspsych-dev](https://github.com/jspsych/jspsych-dev) repository. Plugins can be written in either plain [JavaScript](https://github.com/jspsych/jspsych-dev/tree/main/packages/new-plugin/templates/plugin-template-js/src/index.js) or in [TypeScript](https://github.com/jspsych/jspsych-dev/tree/main/packages/new-plugin/templates/plugin-template-ts/src/index.ts). -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 [`README`](https://github.com/jspsych/jspsych-contrib?tab=readme-ov-file#creating-a-new-plugin-or-extension) of jspsych-contrib. +To get started with a template, we recommend using the CLI tools that we have published in jspsych-dev. These tools automate the setup of a new plugin in either JavaScript or TypeScript. Additional information about the CLI tools is available in the [`README`](https://github.com/jspsych/jspsych-dev/blob/main/README.md) of jspsych-dev. ## Plugin components diff --git a/docs/support/migration-v7.md b/docs/support/migration-v7.md index c71be507..b3e0cede 100644 --- a/docs/support/migration-v7.md +++ b/docs/support/migration-v7.md @@ -114,11 +114,11 @@ var trial = { ## Custom plugins -If you have custom plugins that you would like to upgrade to be compatible with v7.x we recommend using our [plugin template](https://github.com/jspsych/jspsych-contrib/blob/main/packages/plugin-template/index.js). +If you have custom plugins that you would like to upgrade to be compatible with v7.x we recommend using our [plugin template](https://github.com/jspsych/jspsych-dev/tree/main/packages/new-plugin/templates). The new template implements plugins as a class, but the core components are essentially unchanged. -* Anything in `plugin.info` from a v6.x plugin should be moved into the `info` object. Note that the `type` argument for the parameters follows a slightly different syntax in the v7.x plugins. This object is then [assigned as a static property of the class](https://github.com/jspsych/jspsych-contrib/blob/6a27c3fc72fdb1feb1a4041cd670775a7c4bf51d/packages/plugin-template/index.js#L39). +* Anything in `plugin.info` from a v6.x plugin should be moved into the `info` object. Note that the `type` argument for the parameters follows a slightly different syntax in the v7.x plugins. This object is then [assigned as a static property of the class](https://github.com/jspsych/jspsych-dev/blob/main/packages/new-plugin/templates/plugin-template-js/src/index.js#L58). * Anything in `plugin.trial` from a v6.x plugin should be moved into the `trial` method inside the class. * The new template has a `constructor()` function that accepts an instance of jsPsych. You do not need to adjust this portion of the plugin.